Geen omschrijving

assessment_report.blade.php 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. @extends('layouts.master')
  2. @section('navigation')
  3. @if($role==1)
  4. @include('local.managers.admins._navigation')
  5. @elseif($role==2)
  6. @include('local.managers.sCoords._navigation')
  7. @elseif($role==3)
  8. @include('local.managers.pCoords._navigation')
  9. @else
  10. @include('local.professors._navigation')
  11. @endif
  12. @stop
  13. @section('main')
  14. <div class="row">
  15. <div class="col-md-12">
  16. <p>This report contains performance information for all your Program's assessed courses during the following semester(s):</p>
  17. <ul>
  18. @foreach (Session::get('semesters_info') as $semester_info)
  19. <li>{{ $semester_info }}</li>
  20. @endforeach
  21. </ul>
  22. <h3 id="{{ $outcome->id }}" class="outcome">{{ $outcome->name }}</h3>
  23. <table class="table table-condensed table-bordered datatable">
  24. <thead>
  25. <tr>
  26. <th>Course</th>
  27. <th>Program</th>
  28. <th>Findings</th>
  29. </tr>
  30. </thead>
  31. <tfoot>
  32. <tr class="column-search">
  33. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  34. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  35. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  36. </tr>
  37. </tfoot>
  38. <tbody>
  39. <!-- For each grouped course -->
  40. @foreach($courses as $index2=>$course)
  41. <!-- If grouped course has activities that evaluate the outcome -->
  42. <?php
  43. $sections_evaluating = Course::has('activities')
  44. //->whereNotNull('outcomes_attempted')
  45. //->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
  46. //->with(array('activities'=>function($query) use(&$outcome){
  47. // $query->whereNotNull('outcomes_attempted');
  48. // $query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');} ))
  49. ->where('code', $course->code)->where('number',$course->number)
  50. ->whereIn('semester_id', Session::get('semesters_ids'))
  51. ->get();
  52. $semester_code = DB::table('semesters')->where('id', '=', $course->semester_id)->first();
  53. $program = DB::table('programs')->where('id', $course->program_id)->first();
  54. ?>
  55. @if(count($sections_evaluating))
  56. <tr>
  57. <td>
  58. {{ $course->code}}-{{ $course->number }} ({{ $semester_code->code }})
  59. </td>
  60. <td>{{ $program->name }}</td>
  61. <td>
  62. <!-- For each section -->
  63. @foreach($sections_evaluating as $index3 => $section)
  64. <h5><u>Instance {{ $section->section }}</u></h5>
  65. <!-- For each activity in the section -->
  66. @foreach($section->activities as $index4 => $activity)
  67. <?php Log::info($section); Log::info($section->activities) ;
  68. Log::info($activity->o_att_array);
  69. Log::info("this is the cap_array for ". $activity->name);
  70. Log::info($activity->cap_array);
  71. Log::info('aqui papi');?>
  72. <!-- If activity is not draft, has a rubric and the rubric has the outcome being evaluated -->
  73. @if($activity->draft ==0 && $activity->diagnostic ==0&& array_key_exists($outcome->id, (array)$activity->o_att_array))
  74. <h5>Measure {{ $index4 + 1 }}</h5>
  75. <p>A rubric was used in the {{ $section->code }}-{{ $section->number }} ({{ $section->name }}) course ({{ date('M Y', strtotime($course->updated_at))}}) to assess students’ <u>{{ strtolower($outcome->name) }}</u> in the activity: "<strong>{{ $activity->name }}</strong>". At the time of assessment there were {{ $activity->amount_of_assessed_students() }} students in the section.</p>
  76. <p>The expected performance level was that <strong>{{ $activity->rubric[0]->expected_percentage }}%</strong> of students participating in the activity would score <strong>{{ $activity->rubric[0]->expected_points }} points</strong> or more in the 1-{{$activity->rubric[0]->max_score}} point scale used.</p>
  77. <p>The results for each criterion were as follows:</p>
  78. <table class="table table-condensed table-bordered datatable">
  79. @foreach($activity->cap_array as $criterion_id => $criterion)
  80. @if(in_array($outcome->id, json_decode($criterion->outcome_id)) /*== $outcome->id*/ && $criterion->score_percentage >= $activity->rubric[0]->expected_percentage )
  81. <tr>
  82. <td>{{ $criterion->name }}</td>
  83. <td class="col-md-1 success">{{ $criterion->score_percentage }}%</td>
  84. </tr>
  85. @elseif(in_array($outcome->id, json_decode($criterion->outcome_id)) && $criterion->score_percentage < $activity->rubric[0]->expected_percentage )
  86. <tr>
  87. <td>{{ $criterion->name }}</td>
  88. <td class="col-md-1 danger">{{ $criterion->score_percentage }}%</td>
  89. </tr>
  90. @endif
  91. @endforeach
  92. </table>
  93. <ul>
  94. </ul>
  95. <p>
  96. <?php
  97. $o_att_array = $activity->o_att_array;
  98. $o_ach_array = $activity->o_ach_array;
  99. Log::info($o_att_array);
  100. Log::info($o_ach_array);
  101. Log::info('los outcomes');
  102. $percentage = ($o_ach_array[$outcome->id]/$o_att_array[$outcome->id])*100;
  103. ?>
  104. @if($percentage >= 100)
  105. The expected goal was reached in <strong>all</strong> (100%) of the criteria assessed. Therefore, the goal for this outcome ({{ $outcome->expected_outcome }}%) was <strong>met</strong>.
  106. @elseif ($percentage < 1)
  107. The expected goal was reached in <strong>none</strong> (0%) of the criteria assessed. Therefore, the goal for this outcome ({{ $outcome->expected_outcome }}%) was <strong>not met</strong>.
  108. @elseif ($percentage >= $outcome->expected_outcome)
  109. The expected goal was reached in <strong>{{ $o_ach_array[$outcome->id] }}</strong> out of the <strong>{{ $o_att_array[$outcome->id] }}</strong> ({{ round($percentage, 2) }}%) criteria assessed. Therefore, the goal for this outcome ({{ $outcome->expected_outcome }}%) was <strong>met</strong>.
  110. @elseif ($percentage < $outcome->expected_outcome)
  111. The expected goal was reached in <strong>{{ $o_ach_array[$outcome->id] }}</strong> out of the <strong>{{ $o_att_array[$outcome->id] }}</strong> ({{ round($percentage, 2) }}%) criteria assessed. Therefore, the goal for this outcome ({{ $outcome->expected_outcome }}%) was <strong> not met</strong>.
  112. @endif
  113. </p>
  114. <h5><strong>Transforming Actions</strong></h5>
  115. @if($activity->transforming_actions)
  116. {{ $activity->transforming_actions }}
  117. @else
  118. None
  119. @endif
  120. @elseif ($activity->draft == 0)
  121. <h5>Measure {{ $index4 + 1 }}</h5>
  122. <em>Outcome not measured.</em>
  123. @else
  124. @endif
  125. @endforeach
  126. @endforeach
  127. </td>
  128. </tr>
  129. @else
  130. <tr>
  131. <td>
  132. <h4>{{ $course->code}}-{{ $course->number }}</h4>
  133. </td>
  134. <td>
  135. <p>No assessment.</p>
  136. </td>
  137. </tr>
  138. @endif
  139. @endforeach
  140. </tbody>
  141. </table>
  142. </div>
  143. </div>
  144. @stop
  145. @section('included-js')
  146. @include('global._datatables_js')
  147. @stop
  148. @section('javascript')
  149. // Hide tables that have no courses
  150. $('.no-courses').each(function() {
  151. //$(this).closest('tr').hide();
  152. });
  153. // Hide tables with empty bodies
  154. $('tbody').each(function() {
  155. if($(this).children(':visible').length==0)
  156. {
  157. //$(this).closest('table').hide();
  158. }
  159. });
  160. // ----------------------------------------------------------------------------
  161. // Events
  162. //
  163. $('.to-top').on('click', function(e) {
  164. e.preventDefault();
  165. $(this).scrollTop(0);
  166. $('html').animate({scrollTop:0}, 1);
  167. $('body').animate({scrollTop:0}, 1);
  168. })
  169. @stop