No Description

assessment_report.blade.php 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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
  15. following semester(s):</p>
  16. <ul>
  17. @foreach (Session::get('semesters_info') as $semester_info)
  18. <li>{{ $semester_info }}</li>
  19. @endforeach
  20. </ul>
  21. @if (!$school->programs->isEmpty())
  22. <p class="hidden-print">Unlinked programs did not assess this outcome.</p>
  23. <h3>Table of Contents</h3>
  24. <ol id="table-of-contents" class="upper-roman">
  25. </ol>
  26. <h3 id="{{ $outcome->id }}" class="outcome">{{ $outcome->name }}</h3>
  27. <table class="table table-condensed table-bordered">
  28. <thead>
  29. <tr>
  30. <th colspan="12">
  31. <h4 id="{{ $outcome->id }}-{{ $school->id }}" class="school table-header">
  32. {{ $school->name }}
  33. </h4>
  34. </th>
  35. </tr>
  36. <tr class="center-text">
  37. <th>Academic Program</th>
  38. <th>Findings</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. @foreach ($school->programs as $program)
  43. @if ($program->assessesOutcome($outcome->id))
  44. <tr>
  45. <td id="{{ $outcome->id }}-{{ $school->id }}-{{ $program->id }}"
  46. class="program col-md-3">
  47. <h5>{{ $program->name }}</h5>
  48. </td>
  49. <td class="col-md-9">
  50. <!-- For each grouped course -->
  51. @foreach ($program->courses as $index2 => $course)
  52. <!-- If grouped course has activities that evaluate the outcome -->
  53. <?php
  54. $sections_evaluating = Course::has('activities')
  55. ->whereNotNull('outcomes_attempted')
  56. ->whereRaw('outcomes_attempted not like \'%"' . $outcome->id . '":0%\'')
  57. ->with([
  58. 'activities' => function ($query) use (&$outcome) {
  59. $query->whereNotNull('outcomes_attempted');
  60. $query->whereRaw('outcomes_attempted not like \'%"' . $outcome->id . '":0%\'');
  61. },
  62. ])
  63. ->where('code', $course->code)
  64. ->where('number', $course->number)
  65. ->whereIn('semester_id', Session::get('semesters_ids'))
  66. ->get();
  67. ?>
  68. @if (count($sections_evaluating))
  69. <a class="to-top hidden-print" href="">
  70. <span class="glyphicon glyphicon-arrow-up"></span>
  71. To Top
  72. </a>
  73. <h4>{{ $course->code }}-{{ $course->number }}</h4>
  74. <!-- For each section -->
  75. @foreach ($sections_evaluating as $index3 => $section)
  76. <h5><u>Instance {{ $index3 + 1 }}</u></h5>
  77. <!-- For each activity in the section -->
  78. @foreach ($section->activities as $index4 => $activity)
  79. <!-- If activity has a rubric and the rubric has the outcome being evaluated -->
  80. @if (array_key_exists($outcome->id, (array) $activity->o_att_array) && $activity->o_att_array[$outcome->id] >= 1)
  81. <h5>Measure {{ $index4 + 1 }}</h5>
  82. <p>A rubric was used in the
  83. {{ $section->code }}-{{ $section->number }}
  84. ({{ $section->name }}) course
  85. ({{ date('M Y', strtotime($course->updated_at)) }}) to
  86. assess students’ <u>{{ strtolower($outcome->name) }}</u>
  87. in the activity:
  88. "<strong>{{ $activity->name }}</strong>". N=
  89. {{ count($section->students) }}. </p>
  90. <p>The expected performance level was that
  91. <strong>{{ $activity->rubric->expected_percentage }}%</strong>
  92. of students participating in the activity would score
  93. <strong>{{ $activity->rubric->expected_points }}
  94. points</strong> or more in the 1-8 point scale used.</p>
  95. <p>The results for each criterion were as follows:</p>
  96. <table class="table table-condensed table-bordered">
  97. @foreach ((array) $activity->cap_array as $index5 => $cap)
  98. <?php
  99. $criterion = Criterion::find($index5);
  100. ?>
  101. @if ($criterion['outcome_id'] == $outcome->id && $cap >= $activity->rubric->expected_percentage)
  102. <tr>
  103. <td>{{ $criterion['name'] }}</td>
  104. <td class="col-md-1 success">
  105. {{ $cap }}%</td>
  106. </tr>
  107. @elseif($criterion['outcome_id'] == $outcome->id && $cap < $activity->rubric->expected_percentage)
  108. <tr>
  109. <td>{{ $criterion['name'] }}</td>
  110. <td class="col-md-1 danger">
  111. {{ $cap }}%</td>
  112. </tr>
  113. @endif
  114. @endforeach
  115. </table>
  116. <ul>
  117. </ul>
  118. <p>
  119. <?php
  120. $o_att_array = $activity->o_att_array;
  121. $o_ach_array = $activity->o_ach_array;
  122. $percentage = ($o_ach_array[$outcome->id] / $o_att_array[$outcome->id]) * 100;
  123. ?>
  124. @if ($percentage >= 100)
  125. The expected goal was reached in <strong>all</strong>
  126. (100%) of the criteria assessed. Therefore, the goal for
  127. this outcome ({{ $outcome->expected_outcome }}%) was
  128. <strong>met</strong>.
  129. @elseif ($percentage < 1)
  130. The expected goal was reached in <strong>none</strong>
  131. (0%) of the criteria assessed. Therefore, the goal for
  132. this outcome ({{ $outcome->expected_outcome }}%) was
  133. <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
  137. of the
  138. <strong>{{ $o_att_array[$outcome->id] }}</strong>
  139. ({{ round($percentage, 2) }}%) criteria assessed.
  140. Therefore, the goal for this outcome
  141. ({{ $outcome->expected_outcome }}%) was
  142. <strong>met</strong>.
  143. @elseif ($percentage < $outcome->expected_outcome)
  144. The expected goal was reached in
  145. <strong>{{ $o_ach_array[$outcome->id] }}</strong> out
  146. of the
  147. <strong>{{ $o_att_array[$outcome->id] }}</strong>
  148. ({{ round($percentage, 2) }}%) criteria assessed.
  149. Therefore, the goal for this outcome
  150. ({{ $outcome->expected_outcome }}%) was <strong> not
  151. met</strong>.
  152. @endif
  153. </p>
  154. <h5><strong>Transformative Actions</strong></h5>
  155. @if ($activity->transforming_actions)
  156. {{ $activity->transforming_actions }}
  157. @else
  158. None
  159. @endif
  160. <br><br>
  161. @else
  162. <h5>Measure {{ $index4 + 1 }}</h5>
  163. <em>Outcome not measured.</em>
  164. @endif
  165. @endforeach
  166. @endforeach
  167. <hr>
  168. @endif
  169. @endforeach
  170. </td>
  171. </tr>
  172. @else
  173. <tr>
  174. <td id="{{ $outcome->id }}-{{ $school->id }}-{{ $program->id }}"
  175. class="program no-courses col-md-3">{{ $program->name }}</td>
  176. <td class="col-md-9">
  177. This program does not assess {{ $outcome->name }}.
  178. </td>
  179. </tr>
  180. @endif
  181. @endforeach
  182. </tbody>
  183. </table>
  184. @else
  185. <p class="lead">No programs have assessed courses during the selected semesters.</p>
  186. @endif
  187. </div>
  188. </div>
  189. @stop
  190. @section('javascript')
  191. // Hide tables that have no courses
  192. $('.no-courses').each(function() {
  193. // $(this).closest('tr').hide();
  194. });
  195. // Hide tables with empty bodies
  196. $('tbody').each(function() {
  197. if($(this).children(':visible').length==0)
  198. {
  199. $(this).closest('table').hide();
  200. }
  201. });
  202. // Build table of contents
  203. var outcome = $('.outcome');
  204. var str ='';
  205. str+='<li><a href="#'+outcome.attr('id')+'">'+outcome.text()+'</a>
  206. <ol class="schools upper-alpha">';
  207. $('[id^='+outcome.attr('id')+'-].school:visible').each(function(e){
  208. var school = $(this);
  209. str+='<li><a href="#'+school.attr('id')+'">'+school.text()+'</a>
  210. <ol class="programs">';
  211. $('[id^='+school.attr('id')+'-].program:visible').each(function(e){
  212. var program = $(this);
  213. if(!program.hasClass('no-courses'))
  214. str+='<li><a href="#'+program.attr('id')+'">'+program.text()+'</a></li>';
  215. else
  216. str+='<li>'+program.text()+'</li>';
  217. });
  218. str+='</ol>
  219. </li>';
  220. });
  221. str+='</ol>
  222. </li>';
  223. // console.log(str);
  224. $('#table-of-contents').append(str);
  225. // ----------------------------------------------------------------------------
  226. // Events
  227. //
  228. $('.to-top').on('click', function(e) {
  229. e.preventDefault();
  230. $(this).scrollTop(0);
  231. $('html').animate({scrollTop:0}, 1);
  232. $('body').animate({scrollTop:0}, 1);
  233. })
  234. @stop