No Description

new_assessment_report.blade.php 18KB

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