No Description

new_assessment_report.blade.php 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  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. @else
  10. @include('local.professors._navigation')
  11. @endif
  12. @stop
  13. @section('main')
  14. <div class="row">
  15. <div class="col-md-12">
  16. <p>This report contains performance information for all your Program's assessed courses during the following semester(s):</p>
  17. <ul>
  18. @foreach (Session::get('semesters_info') as $semester_info)
  19. <li>{{ $semester_info }}</li>
  20. @endforeach
  21. </ul>
  22. <!-- For each grouped course -->
  23. <ul id = "levelTabs" class="nav nav-tabs" role="tablist">
  24. @foreach($courses as $index2=>$course)
  25. <?php
  26. /*$sections_evaluating = Course::has('activities')
  27. ->whereNotNull('outcomes_attempted')
  28. ->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
  29. ->with(array('activities'=>function($query) use(&$outcome){
  30. $query->whereNotNull('outcomes_attempted');
  31. $query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');} ))
  32. ->where('code', $course->code)->where('number',$course->number)
  33. ->whereIn('semester_id', Session::get('semesters_ids'))
  34. ->get();*/
  35. $sections_evaluating = Course::has('activities')
  36. //->whereNotNull('outcomes_attempted')
  37. //->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
  38. ->with(array('activities'=>function($query) use(&$course){
  39. $activities = DB::table('activities')
  40. ->join('activity_criterion', 'activity_criterion.activity_id', '=', 'activities.id')
  41. ->join('assessments', 'assessments.activity_criterion_id', '=','activity_criterion.id')
  42. //->join('criterion_objective_outcome', 'activity_criterion.criterion_id', '=', 'criterion_objective_outcome.criterion_id')
  43. ->where('course_id', $course->id)
  44. //->where('criterion_objective_outcome.outcome_id', $outcome->id)
  45. ->select('activity_id')
  46. ->lists('activity_id');
  47. //$query->whereNotNull('outcomes_attempted');
  48. //$query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');
  49. $query->whereIn('id', $activities);
  50. } ))
  51. ->where('code', $course->code)->where('number',$course->number)
  52. ->whereIn('semester_id', Session::get('semesters_ids'))
  53. ->get();
  54. ?>
  55. @if($sections_evaluating)
  56. <li role= "presentation">
  57. <a onclick = "$(this).tab('show')" data-toggle = "tab" href ="#{{ $course->code}}-{{ $course->number }}"
  58. role ="tab">{{ $course->code}}-{{ $course->number }}</a>
  59. </li>
  60. @section('lists')
  61. <div role = "tabpanel" class = 'tab-pane' id = "{{$course->code}}-{{$course->number}}">
  62. @foreach($sections_evaluating as $index3 => $section)
  63. <h3 style="text-align: center"> Course: {{$course->code}} {{$course->number}}-{{$section->section}}</h3>
  64. <?php
  65. Log::info($section->publishedActivities);
  66. ?>
  67. @foreach($section->publishedActivities as $index4 => $activity)
  68. <h5 style="display: inline;">Activity {{$index4+1}}: </h4>
  69. <p style="display: inline;">{{$activity->name}} <strong>({{$activity->date}})</strong></p>
  70. <br>
  71. <br>
  72. <h5 style="display: inline;">Performance Indicators: </h4>
  73. <?php
  74. Log::info($activity->rubric[0]);
  75. ?>
  76. <p style="display: inline;"><i>{{$activity->rubric[0]->num_scales}} (
  77. <?php
  78. $titles = $activity->rubric[0]->getTitles();
  79. ?>
  80. @if(sizeof($titles) != 1)
  81. @foreach ($titles as $index5=>$rubric_title)
  82. @if($index5!= ($activity->rubric[0]->num_scales)-1 )
  83. {{$rubric_title->text}},
  84. @else
  85. and {{$rubric_title->text}}
  86. @endif
  87. @endforeach
  88. )
  89. @else
  90. {{$titles[0]->text}} )
  91. @endif
  92. </i></p>
  93. <br>
  94. <h5 style="display: inline;">Scale: </h4>
  95. @if($activity->rubric[0]->max_score == 1)
  96. <p style="display: inline;">1 point scale</p>
  97. @else
  98. <p style="display: inline;">1-{{$activity->rubric[0]->max_score}} point scale</p>
  99. @endif
  100. <br>
  101. <br>
  102. <h4>Perfomance by Learning Outcome Criteria</h4>
  103. <h5 style = "display: inline; margin:30px;">Target by criterion: </h5>
  104. <p style = "display: inline;"> <i>{{$activity->rubric[0]->expected_points}} or more</i>
  105. </p>
  106. <br>
  107. <h5 style = "display: inline; margin:30px;">Expected percent of students achieving the target by criterion: </h5>
  108. <p style = "display: inline;"> <i>{{$activity->rubric[0]->expected_percentage}} %</i>
  109. </p>
  110. <br>
  111. <table class='table table-striped table-condensed datatable'>
  112. <thead>
  113. <tr>
  114. <th>
  115. Criterion
  116. </th>
  117. <th>
  118. Number of Students Assessed
  119. </th>
  120. <th>
  121. Number of students that achieved the target
  122. </th>
  123. <th>
  124. %
  125. </th>
  126. <th>
  127. Outcomes
  128. </th>
  129. </tr>
  130. </thead>
  131. <tbody>
  132. @foreach($activity->allActivityCriterionInfo() as $index5=>$ac_criterion)
  133. <tr>
  134. <td> {{$ac_criterion->name}}</td>
  135. <td>{{Criterion::students_attempted($ac_criterion->criterion_id, $activity->id)}}
  136. </td>
  137. <td>
  138. {{Criterion::students_achieved($ac_criterion->criterion_id, $activity->id)}}
  139. </td>
  140. <?php
  141. $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity->id);
  142. $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity->id);
  143. $percentage = "N/A";
  144. $activity->getOutcomeReport();
  145. ?>
  146. @if($out_att==0)
  147. <td class="col-md-1 danger">{{ $percentage }}</td>
  148. @else
  149. <?php
  150. $percentage = round(($out_ach/$out_att)*100, 2)
  151. ?>
  152. @if ($percentage>=$activity->rubric[0]->expected_percentage)
  153. <td class="col-md-1 success">{{ $percentage }}%</td>
  154. @else
  155. <td class="col-md-1 danger">{{ $percentage }}%</td>
  156. @endif
  157. @endif
  158. <td>
  159. @foreach(Criterion::outcomes($ac_criterion->criterion_id) as $index6=>$outcome)
  160. {{$index6 + 1}}. {{$outcome->name}}
  161. <br>
  162. @endforeach
  163. </td>
  164. </tr>
  165. @endforeach
  166. </tbody>
  167. </table>
  168. <hr>
  169. <br>
  170. <h4>Perfomance by Learning Outcome Student</h4>
  171. <h5 style = "display: inline; margin:30px;">Target by outcome: </h5>
  172. <p style = "display: inline;"> <i>>= 66.67% of the attempts</i>
  173. </p>
  174. <br>
  175. <h5 style = "display: inline; margin:30px;">Expected percent of students achieving the target by outcome: </h5>
  176. <p style = "display: inline;"> <i>TODO 75.00 %</i>
  177. </p>
  178. <br>
  179. <table class='table table-striped table-condensed datatable'>
  180. <thead>
  181. <tr>
  182. <th>
  183. Outcome
  184. </th>
  185. <th>
  186. Number of Students Assessed
  187. </th>
  188. <th>
  189. Number of students that achieved the target
  190. </th>
  191. <th>
  192. %
  193. </th>
  194. </tr>
  195. </thead>
  196. <tbody>
  197. @foreach($activity->getOutcomeReport() as $outcome)
  198. <tr>
  199. <td>
  200. {{$outcome->name}}
  201. </td>
  202. <td>
  203. {{$outcome->attempted}}
  204. </td>
  205. <td>
  206. {{$outcome->achieved}}
  207. </td>
  208. @if($outcome->percentage>= 75)
  209. <td class="col-md-1 success">{{ $outcome->percentage }}%</td>
  210. @else
  211. <td class="col-md-1 danger">{{ $outcome->percentage }}%</td>
  212. @endif
  213. </tr>
  214. @endforeach
  215. </tbody>
  216. </table>
  217. <br>
  218. <hr>
  219. @endforeach
  220. @endforeach
  221. @stop
  222. @else
  223. <h4>There is no assessment for this course.</h4>
  224. @endif
  225. @endforeach
  226. <ul>
  227. <div id="allLists" class="tab-content">
  228. @yield('lists')
  229. </div>
  230. </div>
  231. </div>
  232. @stop
  233. @section('javascript')
  234. @stop