No Description

assessment_report.blade.php 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. @extends('layouts.master')
  2. @section('navigation')
  3. @if(Auth::user()->role==1)
  4. @include('local.managers.admins._navigation')
  5. @elseif(Auth::user()->role==2)
  6. @include('local.managers.sCoords._navigation')
  7. @elseif(Auth::user()->role==3)
  8. @include('local.managers.pCoords._navigation')
  9. @endif
  10. @stop
  11. @section('main')
  12. <div class="row">
  13. <div class="col-md-12">
  14. <p>This report contains performance information for all your School's Programs with assessed courses during the following semester(s):</p>
  15. <ul>
  16. @foreach (Session::get('semesters_info') as $semester_info)
  17. <li>{{ $semester_info }}</li>
  18. @endforeach
  19. </ul>
  20. @if(!$school->programs->isEmpty())
  21. <p class="hidden-print">Unlinked programs did not assess this outcome.</p>
  22. <h3>Table of Contents</h3>
  23. <ol id="table-of-contents" class="upper-roman">
  24. </ol>
  25. <h3 id="{{ $outcome->id }}" class="outcome">{{ $outcome->name }}</h3>
  26. <table class="table table-condensed table-bordered">
  27. <thead>
  28. <tr>
  29. <th colspan="12">
  30. <h4 id="{{ $outcome->id }}-{{ $school->id }}" class="school table-header" >
  31. {{ $school->name }}
  32. </h4>
  33. </th>
  34. </tr>
  35. <tr class="center-text">
  36. <th>Academic Program</th>
  37. <th>Findings</th>
  38. </tr>
  39. </thead>
  40. <tbody>
  41. @foreach ($school->programs as $program)
  42. @if($program->assessesOutcome($outcome->id))
  43. <tr>
  44. <td id="{{ $outcome->id }}-{{ $school->id }}-{{ $program->id }}" class="program col-md-3" ><h5>{{ $program->name }}</h5></td>
  45. <td class="col-md-9">
  46. <!-- For each grouped course -->
  47. @foreach($program->courses as $index2=>$course)
  48. <!-- If grouped course has activities that evaluate the outcome -->
  49. <?php
  50. $sections_evaluating = Course::has('activities')
  51. ->whereNotNull('outcomes_attempted')
  52. ->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
  53. ->with(array('activities'=>function($query) use(&$outcome){
  54. $query->whereNotNull('outcomes_attempted');
  55. $query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');} ))
  56. ->where('code', $course->code)->where('number',$course->number)
  57. ->whereIn('semester_id', Session::get('semesters_ids'))
  58. ->get();
  59. ?>
  60. @if(count($sections_evaluating))
  61. <a class="to-top hidden-print" href="">
  62. <span class="glyphicon glyphicon-arrow-up"></span>
  63. To Top
  64. </a>
  65. <h4>{{ $course->code}}-{{ $course->number }}</h4>
  66. <!-- For each section -->
  67. @foreach($sections_evaluating as $index3 => $section)
  68. <h5><u>Instance {{ $index3 + 1}}</u></h5>
  69. <!-- For each activity in the section -->
  70. @foreach($section->activities as $index4 => $activity)
  71. <!-- If activity has a rubric and the rubric has the outcome being evaluated -->
  72. @if(array_key_exists($outcome->id, (array)$activity->o_att_array) && $activity->o_att_array[$outcome->id] >=1)
  73. <h5>Measure {{ $index4 + 1 }}</h5>
  74. <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>". N= {{ count($section->students) }}. </p>
  75. <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>
  76. <p>The results for each criterion were as follows:</p>
  77. <table class="table table-condensed table-bordered">
  78. @foreach((array)$activity->cap_array as $index5 => $cap)
  79. <?php
  80. $criterion = Criterion::find($index5);
  81. ?>
  82. @if($criterion['outcome_id'] == $outcome->id && $cap >= $activity->rubric->expected_percentage )
  83. <tr>
  84. <td>{{ $criterion['name'] }}</td>
  85. <td class="col-md-1 success">{{ $cap }}%</td>
  86. </tr>
  87. @elseif($criterion['outcome_id'] == $outcome->id && $cap < $activity->rubric->expected_percentage )
  88. <tr>
  89. <td>{{ $criterion['name'] }}</td>
  90. <td class="col-md-1 danger">{{ $cap }}%</td>
  91. </tr>
  92. @endif
  93. @endforeach
  94. </table>
  95. <ul>
  96. </ul>
  97. <p>
  98. <?php
  99. $o_att_array = $activity->o_att_array;
  100. $o_ach_array = $activity->o_ach_array;
  101. $percentage = ($o_ach_array[$outcome->id]/$o_att_array[$outcome->id])*100;
  102. ?>
  103. @if($percentage >= 100)
  104. 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>.
  105. @elseif ($percentage < 1)
  106. 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>.
  107. @elseif ($percentage >= $outcome->expected_outcome)
  108. 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>.
  109. @elseif ($percentage < $outcome->expected_outcome)
  110. 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>.
  111. @endif
  112. </p>
  113. <h5><strong>Transforming Actions</strong></h5>
  114. @if($activity->transforming_actions)
  115. {{ $activity->transforming_actions }}
  116. @else
  117. None
  118. @endif
  119. <br><br>
  120. @else
  121. <h5>Measure {{ $index4 + 1 }}</h5>
  122. <em>Outcome not measured.</em>
  123. @endif
  124. @endforeach
  125. @endforeach
  126. <hr>
  127. @endif
  128. @endforeach
  129. </td>
  130. </tr>
  131. @else
  132. <tr>
  133. <td id="{{ $outcome->id }}-{{ $school->id }}-{{ $program->id }}" class="program no-courses col-md-3" >{{ $program->name }}</td>
  134. <td class="col-md-9">
  135. This program does not assess {{ $outcome->name }}.
  136. </td>
  137. </tr>
  138. @endif
  139. @endforeach
  140. </tbody>
  141. </table>
  142. @else
  143. <p class="lead">No programs have assessed courses during the selected semesters.</p>
  144. @endif
  145. </div>
  146. </div>
  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. // Build table of contents
  161. var outcome = $('.outcome');
  162. var str ='';
  163. str+='<li><a href="#'+outcome.attr('id')+'">'+outcome.text()+'</a><ol class="schools upper-alpha">';
  164. $('[id^='+outcome.attr('id')+'-].school:visible').each(function(e){
  165. var school = $(this);
  166. str+='<li><a href="#'+school.attr('id')+'">'+school.text()+'</a><ol class="programs">';
  167. $('[id^='+school.attr('id')+'-].program:visible').each(function(e){
  168. var program = $(this);
  169. if(!program.hasClass('no-courses'))
  170. str+='<li><a href="#'+program.attr('id')+'">'+program.text()+'</a></li>';
  171. else
  172. str+='<li>'+program.text()+'</li>';
  173. });
  174. str+='</ol></li>';
  175. });
  176. str+='</ol></li>';
  177. // console.log(str);
  178. $('#table-of-contents').append(str);
  179. // ----------------------------------------------------------------------------
  180. // Events
  181. //
  182. $('.to-top').on('click', function(e) {
  183. e.preventDefault();
  184. $(this).scrollTop(0);
  185. $('html').animate({scrollTop:0}, 1);
  186. $('body').animate({scrollTop:0}, 1);
  187. })
  188. @stop