Bez popisu

assessment_report.blade.php 15KB

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