No Description

assessment_report.blade.php 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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. ?>
  61. @if(count($sections_evaluating_outcome))
  62. <h4>{{ $course->code}}-{{ $course->number }}</h4>
  63. <!-- For each section -->
  64. @foreach($sections_evaluating_outcome as $section_index => $section)
  65. <h5><u>Instance {{ $section_index + 1}}</u></h5>
  66. <!-- For each activity in the section -->
  67. @foreach($section->activities as $activity_index => $activity)
  68. <!-- If activity has a rubric and the rubric has the outcome being evaluated -->
  69. @if(array_key_exists($outcome->id, (array)$activity->o_att_array) && $activity->o_att_array[$outcome->id] >=1 && isset($section)&& isset($activity->rubric))
  70. <h5>Measure {{ $activity_index + 1 }}</h5>
  71. <?php
  72. /*
  73. var_dump($section->code);
  74. var_dump($section->number);
  75. var_dump($section->name);
  76. var_dump($outcome->name);
  77. var_dump(date('M Y', strtotime($activity->date)));
  78. var_dump($activity->name);
  79. var_dump(count($section->students));
  80. print"<br>";
  81. 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);
  82. exit();
  83. */
  84. ?>
  85. <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>
  86. <p>The expected performance level was that <strong>{{ $activity->rubric->expected_percentage }}%</strong> of students participating in the activity would score <strong>{{ $activity->rubric->expected_points }} points</strong> or more in the 1-8 point scale used.</p>
  87. <p>The results for each criterion were as follows:</p>
  88. <?php
  89. $rubric_contents = json_decode($activity->rubric->contents);
  90. ?>
  91. <table class="table table-condensed table-bordered">
  92. <tbody>
  93. @foreach((array)$activity->cap_array as $criterion_id => $criteria_achieved_percentage)
  94. <tr>
  95. <?php
  96. $rubric_criterion_outcome_id = NULL;
  97. foreach ($rubric_contents as $rubric_criterion) {
  98. if($rubric_criterion->id == $criterion_id) {
  99. $rubric_criterion_outcome_id = $rubric_criterion->outcome_id;
  100. break;
  101. }
  102. }
  103. $criterion = Criterion::find($criterion_id);
  104. ?>
  105. @if($rubric_criterion_outcome_id == $outcome->id && $criteria_achieved_percentage >= $activity->rubric->expected_percentage )
  106. <td>{{ $criterion['name'] }}</td>
  107. <td class="col-md-1 success">{{ $criteria_achieved_percentage }}%</td>
  108. @elseif($rubric_criterion_outcome_id == $outcome->id && $criteria_achieved_percentage < $activity->rubric->expected_percentage )
  109. <td>{{ $criterion['name'] }}</td>
  110. <td class="col-md-1 danger">{{ $criteria_achieved_percentage }}%</td>
  111. @endif
  112. </tr>
  113. @endforeach
  114. </tbody>
  115. </table>
  116. <p>
  117. <?php
  118. $o_att_array = $activity->o_att_array;
  119. $o_ach_array = $activity->o_ach_array;
  120. $percentage = ($o_ach_array[$outcome->id]/$o_att_array[$outcome->id])*100;
  121. ?>
  122. @if($percentage >= 100)
  123. 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>.
  124. @elseif ($percentage < 1)
  125. 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>.
  126. @elseif ($percentage >= $outcome->expected_outcome)
  127. 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>.
  128. @elseif ($percentage < $outcome->expected_outcome)
  129. 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>.
  130. @endif
  131. </p>
  132. <h5><strong>Transforming Actions</strong></h5>
  133. @if($activity->transforming_actions)
  134. {{ $activity->transforming_actions }}
  135. @else
  136. None
  137. @endif
  138. <br><br>
  139. @else
  140. <h5>Measure {{ $activity_index + 1 }}</h5>
  141. <em>Outcome not measured.</em>
  142. @endif
  143. @endforeach
  144. @endforeach
  145. <hr>
  146. @endif
  147. @endforeach
  148. </td>
  149. </tr>
  150. @else
  151. <tr>
  152. <td>{{ $school->name }}</td>
  153. <td>{{ $program->name }}</td>
  154. <td>No</td>
  155. <td>
  156. This program did not assess {{ $outcome->name }}.
  157. </td>
  158. </tr>
  159. @endif
  160. @endforeach
  161. @endforeach
  162. </tbody>
  163. </table>
  164. </div>
  165. </div>
  166. <span class="js-vars"
  167. data-pdf-url="{{ URL::action('OutcomesController@assessmentReport') }}"
  168. ></span>
  169. @stop
  170. @section('included-js')
  171. @include('global._datatables_js')
  172. @stop
  173. @section('javascript')
  174. // Build table of contents
  175. var outcome = $('.outcome');
  176. var str ='';
  177. str+='<li><a href="#'+outcome.attr('id')+'">'+outcome.text()+'</a><ol class="schools upper-alpha">';
  178. /*$('[id^='+outcome.attr('id')+'-].school:visible').each(function(e){
  179. var school = $(this);
  180. str+='<li><a href="#'+school.attr('id')+'">'+school.text()+'</a><ol class="programs">';
  181. $('[id^='+school.attr('id')+'-].program:visible').each(function(e){
  182. var program = $(this);
  183. if(!program.hasClass('no-courses'))
  184. str+='<li><a href="#'+program.attr('id')+'">'+program.text()+'</a></li>';
  185. else
  186. str+='<li>'+program.text()+'</li>';
  187. });
  188. str+='</ol></li>';
  189. });*/
  190. str+='</ol></li>';
  191. //$('#table-of-contents').append(str);
  192. // ----------------------------------------------------------------------------
  193. // Events
  194. //
  195. $('.to-top').on('click', function(e) {
  196. e.preventDefault();
  197. $(this).scrollTop(0);
  198. $('html').animate({scrollTop:0}, 1);
  199. $('body').animate({scrollTop:0}, 1);
  200. })
  201. @stop