No Description

assessment_report.blade.php 16KB

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