Няма описание

new_assessment_report.blade.php 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  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}}. <?php echo $outcome->name."\n\n\n <br>" ?>
  161. @endforeach
  162. </td>
  163. </tr>
  164. @endforeach
  165. </tbody>
  166. </table>
  167. <hr>
  168. <br>
  169. <h4>Perfomance by Learning Outcome Student</h4>
  170. <h5 style = "display: inline; margin:30px;">Target by outcome: </h5>
  171. <p style = "display: inline;"> <i>>= 66.67% of the attempts</i>
  172. </p>
  173. <br>
  174. <h5 style = "display: inline; margin:30px;">Expected percent of students achieving the target by outcome: </h5>
  175. <p style = "display: inline;"> <i>
  176. <?php
  177. $expected = DB::table('target_outcomes_program')
  178. ->where('program_id', $course->program_id)
  179. ->where('semester_id', $course->semester_id)
  180. ->first()->expected_target;
  181. ?>
  182. {{$expected}}
  183. </i>
  184. </p>
  185. <br>
  186. <table class='table table-striped table-condensed datatable'>
  187. <thead>
  188. <tr>
  189. <th>
  190. Outcome
  191. </th>
  192. <th>
  193. Number of Students Assessed
  194. </th>
  195. <th>
  196. Number of students that achieved the target
  197. </th>
  198. <th>
  199. %
  200. </th>
  201. </tr>
  202. </thead>
  203. <tbody>
  204. @foreach($activity->getOutcomeReport() as $outcome)
  205. <tr>
  206. <td>
  207. {{$outcome->name}}
  208. </td>
  209. <td>
  210. {{$outcome->attempted}}
  211. </td>
  212. <td>
  213. {{$outcome->achieved}}
  214. </td>
  215. @if($outcome->percentage>= $expected)
  216. <td class="col-md-1 success">{{ $outcome->percentage }}%</td>
  217. @else
  218. <td class="col-md-1 danger">{{ $outcome->percentage }}%</td>
  219. @endif
  220. </tr>
  221. @endforeach
  222. </tbody>
  223. </table>
  224. <br>
  225. <hr>
  226. @endforeach
  227. @endforeach
  228. @stop
  229. @else
  230. <h4>There is no assessment for this course.</h4>
  231. @endif
  232. @endforeach
  233. <ul>
  234. <div id="allLists" class="tab-content">
  235. @yield('lists')
  236. </div>
  237. </div>
  238. </div>
  239. @section('included-js')
  240. @include('global._datatables_js')
  241. @stop
  242. @stop
  243. @section('javascript')
  244. @stop