Nenhuma descrição

new_assessment_report.blade.php 15KB

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