No Description

new_assessment_report.blade.php 16KB

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