No Description

assessment_report.blade.php 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. @extends('layouts.master')
  2. @section('navigation')
  3. @include('local.managers.admins._navigation')
  4. @stop
  5. @section('main')
  6. <div class="row">
  7. <div class="col-md-12">
  8. <p>This report contains performance information for all Schools and Programs with assessed courses during the
  9. following semester(s):</p>
  10. <ul>
  11. @foreach (Session::get('semesters_info') as $semester_info)
  12. <li>{{ $semester_info }}</li>
  13. @endforeach
  14. </ul>
  15. <p class="hidden-print">Unlinked programs did not assess this outcome.</p>
  16. <!-- <h3>Table of Contents</h3> -->
  17. <!-- <ol id="table-of-contents" class="upper-roman">
  18. </ol> -->
  19. <h3 id="{{ $outcome->id }}" class="outcome">{{ $outcome->name }}</h3>
  20. <table class="table table-condensed table-bordered datatable">
  21. <thead>
  22. <tr class="center-text">
  23. <th>School or College</th>
  24. <th>Academic Program</th>
  25. <th>Assesses Learning Outcome</th>
  26. <th>Findings</th>
  27. </tr>
  28. </thead>
  29. <tfoot>
  30. <tr class="column-search">
  31. <th><select class="column-search-select form-control">
  32. <option value=""></option>
  33. </select></th>
  34. <th><select class="column-search-select form-control">
  35. <option value=""></option>
  36. </select></th>
  37. <th><select class="column-search-select form-control">
  38. <option value=""></option>
  39. </select></th>
  40. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar" /></th>
  41. </tr>
  42. </tfoot>
  43. <tbody>
  44. @foreach ($schools as $school)
  45. @foreach ($school->programs as $program)
  46. @if ($program->assessesOutcome($outcome->id))
  47. <tr>
  48. <td>{{ $school->name }}</td>
  49. <td>{{ $program->name }}</td>
  50. <td>Yes</td>
  51. <td>
  52. <!-- For each grouped course -->
  53. @foreach ($program->courses as $course_index => $course)
  54. <!-- If grouped course has activities that evaluate the outcome -->
  55. <?php
  56. /* $sections_evaluating_outcome = Course::has('activities')
  57. // ->whereNotNull('outcomes_attempted')
  58. // ->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
  59. ->with(array('activities'=>function($query) use(&$outcome){
  60. // $query->whereNotNull('outcomes_attempted');
  61. // $query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');} ))
  62. // $query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');
  63. } ))
  64. ->where('code', $course->code)->where('number',$course->number)
  65. ->whereIn('semester_id', Session::get('semesters_ids'))
  66. ->get();*/
  67. $sections_evaluating_outcome = Course::has('activities')
  68. ->with([
  69. 'activities' => function ($query) use (&$outcome, &$course) {
  70. $activities = DB::table('activities')
  71. ->join('activity_criterion', 'activity_criterion.activity_id', '=', 'activities.id')
  72. ->join('assessments', 'assessments.activity_criterion_id', '=', 'activity_criterion.id')
  73. ->join('criterion_objective_outcome', 'activity_criterion.criterion_id', '=', 'criterion_objective_outcome.criterion_id')
  74. ->join('courses', 'courses.id', '=', 'activities.course_id')
  75. ->where('courses.code', $course->code)
  76. ->where('courses.number', $course->number)
  77. ->where('criterion_objective_outcome.outcome_id', $outcome->id)
  78. ->select('activity_id')
  79. ->lists('activity_id');
  80. $query->whereIn('id', $activities);
  81. },
  82. ])
  83. ->where('code', $course->code)
  84. ->where('number', $course->number)
  85. ->whereIn('semester_id', Session::get('semesters_ids'))
  86. ->get();
  87. ?>
  88. @if (count($sections_evaluating_outcome))
  89. <h4>{{ $course->code }}-{{ $course->number }}</h4>
  90. <!-- For each section -->
  91. @foreach ($sections_evaluating_outcome as $section_index => $section)
  92. <h5><u>Instance {{ $section_index + 1 }}</u></h5>
  93. <!-- For each activity in the section -->
  94. @foreach ($section->activities as $activity_index => $activity)
  95. <?php
  96. ?>
  97. <!-- If activity has a rubric and the rubric has the outcome being evaluated -->
  98. @if ($activity->draft == 0 && $activity->diagnostic == 0 && array_key_exists($outcome->id, $activity->o_att_array) && $activity->o_att_array[$outcome->id] >= 1 && isset($section) && isset($activity->rubric[0]))
  99. <h5>Measure {{ $activity_index + 1 }}</h5>
  100. <?php
  101. /*
  102. var_dump($section->code);
  103. var_dump($section->number);
  104. var_dump($section->name);
  105. var_dump($outcome->name);
  106. var_dump(date('M Y', strtotime($activity->date)));
  107. var_dump($activity->name);
  108. var_dump(count($section->students));
  109. print"<br>";
  110. print "A rubric was used in the $section->code-$section->number ($section->name) course (". date('M Y', strtotime($activity->date)).") to assess students’ <u>". strtolower($outcome->name) ."</u> in the activity: '<strong>$activity->name </strong>'. N= ". count($section->students);
  111. exit();
  112. */
  113. ?>
  114. <p>A rubric was used in the
  115. {{ $section->code }}-{{ $section->number }}
  116. ({{ $section->name }})
  117. course
  118. ({{ date('M Y', strtotime($activity->date)) }}) to assess
  119. students’ <u>{{ strtolower($outcome->name) }}</u> in the
  120. activity: "<strong>{{ $activity->name }}</strong>". N=
  121. {{ count($section->students) }}. </p>
  122. <p>The expected performance level was that
  123. <strong>{{ $activity->rubric[0]->expected_percentage }}%</strong>
  124. of students participating in the activity would score
  125. <strong>{{ $activity->rubric[0]->expected_points }}
  126. points</strong> or more in the
  127. 1-{{ $activity->rubric[0]->max_score }} point scale used.
  128. </p>
  129. <p>The results for each criterion were as follows:</p>
  130. <?php
  131. //$rubric_contents = json_decode($activity->rubric->contents);
  132. ?>
  133. <table class="table table-condensed table-bordered">
  134. <tbody>
  135. @foreach ((array) $activity->cap_array as $criterion_id => $criterion)
  136. @if (in_array($outcome->id, json_decode($criterion->outcome_id)) /*== $outcome->id*/ && $criterion->score_percentage >= $activity->rubric[0]->expected_percentage)
  137. <tr>
  138. <td>{{ $criterion->name }}</td>
  139. <td class="col-md-1 success">
  140. {{ $criterion->score_percentage }}%
  141. </td>
  142. </tr>
  143. @elseif(in_array($outcome->id, json_decode($criterion->outcome_id)) && $criterion->score_percentage < $activity->rubric[0]->expected_percentage)
  144. <tr>
  145. <td>{{ $criterion->name }}</td>
  146. <td class="col-md-1 danger">
  147. {{ $criterion->score_percentage }}%
  148. </td>
  149. </tr>
  150. @endif
  151. @endforeach
  152. </tbody>
  153. </table>
  154. <p>
  155. <?php
  156. $o_att_array = $activity->o_att_array;
  157. $o_ach_array = $activity->o_ach_array;
  158. $percentage = ($o_ach_array[$outcome->id] / $o_att_array[$outcome->id]) * 100;
  159. ?>
  160. @if ($percentage >= 100)
  161. The expected goal was reached in <strong>all</strong>
  162. (100%) of the criteria assessed. Therefore, the goal for
  163. this outcome ({{ $outcome->expected_outcome }}%) was
  164. <strong>met</strong>.
  165. @elseif ($percentage < 1)
  166. The expected goal was reached in <strong>none</strong>
  167. (0%) of the criteria assessed. Therefore, the goal for
  168. this outcome ({{ $outcome->expected_outcome }}%) was
  169. <strong>not met</strong>.
  170. @elseif ($percentage >= $outcome->expected_outcome)
  171. The expected goal was reached in
  172. <strong>{{ $o_ach_array[$outcome->id] }}</strong> out
  173. of the
  174. <strong>{{ $o_att_array[$outcome->id] }}</strong>
  175. ({{ round($percentage, 2) }}%) criteria assessed.
  176. Therefore, the goal for this outcome
  177. ({{ $outcome->expected_outcome }}%) was
  178. <strong>met</strong>.
  179. @elseif ($percentage < $outcome->expected_outcome)
  180. The expected goal was reached in
  181. <strong>{{ $o_ach_array[$outcome->id] }}</strong> out
  182. of the
  183. <strong>{{ $o_att_array[$outcome->id] }}</strong>
  184. ({{ round($percentage, 2) }}%) criteria assessed.
  185. Therefore, the goal for this outcome
  186. ({{ $outcome->expected_outcome }}%) was <strong> not
  187. met</strong>.
  188. @endif
  189. </p>
  190. <h5><strong>Transformative Actions</strong></h5>
  191. @if ($activity->transforming_actions)
  192. {{ $activity->transforming_actions }}
  193. @else
  194. None
  195. @endif
  196. <br><br>
  197. @else
  198. <h5>Measure {{ $activity_index + 1 }}</h5>
  199. <em>Learning Outcome not measured.</em>
  200. @endif
  201. @endforeach
  202. @endforeach
  203. <hr>
  204. @endif
  205. @endforeach
  206. </td>
  207. </tr>
  208. @else
  209. <tr>
  210. <td>{{ $school->name }}</td>
  211. <td>{{ $program->name }}</td>
  212. <td>No</td>
  213. <td>
  214. This program did not assess {{ $outcome->name }}.
  215. </td>
  216. </tr>
  217. @endif
  218. @endforeach
  219. @endforeach
  220. </tbody>
  221. </table>
  222. </div>
  223. </div>
  224. <span class="js-vars" data-pdf-url="{{ URL::action('OutcomesController@assessmentReport') }}"></span>
  225. @stop
  226. @section('included-js')
  227. @include('global._datatables_js')
  228. @stop
  229. @section('javascript')
  230. // Build table of contents
  231. var outcome = $('.outcome');
  232. var str ='';
  233. str+='<li><a href="#'+outcome.attr('id')+'">'+outcome.text()+'</a>
  234. <ol class="schools upper-alpha">';
  235. /*$('[id^='+outcome.attr('id')+'-].school:visible').each(function(e){
  236. var school = $(this);
  237. str+='<li><a href="#'+school.attr('id')+'">'+school.text()+'</a>
  238. <ol class="programs">';
  239. $('[id^='+school.attr('id')+'-].program:visible').each(function(e){
  240. var program = $(this);
  241. if(!program.hasClass('no-courses'))
  242. str+='<li><a href="#'+program.attr('id')+'">'+program.text()+'</a></li>';
  243. else
  244. str+='<li>'+program.text()+'</li>';
  245. });
  246. str+='</ol>
  247. </li>';
  248. });*/
  249. str+='</ol>
  250. </li>';
  251. //$('#table-of-contents').append(str);
  252. // ----------------------------------------------------------------------------
  253. // Events
  254. //
  255. $('.to-top').on('click', function(e) {
  256. e.preventDefault();
  257. $(this).scrollTop(0);
  258. $('html').animate({scrollTop:0}, 1);
  259. $('body').animate({scrollTop:0}, 1);
  260. })
  261. @stop