Ei kuvausta

assessment_report.blade.php 13KB

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