No Description

new_assessment_report.blade.php 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  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 }} <strong>({{ $activity->date }})</strong>
  83. </p>
  84. <br>
  85. <br>
  86. <h5 style="display: inline;">Performance Indicators: </h5>
  87. <?php
  88. Log::info($activity->rubric[0]);
  89. ?>
  90. <p style="display: inline;"><i>{{ $activity->rubric[0]->num_scales }} (
  91. <?php
  92. $titles = $activity->rubric[0]->getTitles();
  93. ?>
  94. @if (sizeof($titles) != 1)
  95. @foreach ($titles as $index5 => $rubric_title)
  96. @if ($index5 != $activity->rubric[0]->num_scales - 1)
  97. {{ $rubric_title->text }},
  98. @else
  99. and {{ $rubric_title->text }}
  100. @endif
  101. @endforeach
  102. )
  103. @else
  104. {{ $titles[0]->text }} )
  105. @endif
  106. </i></p>
  107. <br>
  108. <h5 style="display: inline;">Scale: </h5>
  109. @if ($activity->rubric[0]->max_score == 1)
  110. <p style="display: inline;">1 point scale</p>
  111. @else
  112. <p style="display: inline;">1-{{ $activity->rubric[0]->max_score }} point scale</p>
  113. @endif
  114. <br>
  115. <br>
  116. <h4>Perfomance by Learning Outcome Criteria</h4>
  117. <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
  118. <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_points }} or more</i>
  119. </p>
  120. <br>
  121. <h5 style="display: inline; margin:30px;">Expected percent of students achieving the target
  122. by criterion: </h5>
  123. <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_percentage }} %</i>
  124. </p>
  125. <br>
  126. <h5 style="display: inline; margin:30px;">Formative Actions: </h5>
  127. <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
  128. @if ($formative_actions)
  129. <p style="display: inline;"> <strong>{{ $formative_actions[0]->at_text }}:
  130. </strong>
  131. <i>{{ $formative_actions[0]->description }}
  132. </i>
  133. </p>
  134. <br>
  135. <h5>Formative Action's Associated
  136. Criteria: </h5>
  137. <ul>
  138. @foreach ($formative_actions as $criteria)
  139. <li> <i>{{ $criteria->name }} <i></li>
  140. @endforeach
  141. </ul>
  142. @else
  143. <p style="display: inline;"> <strong>Has no Formative Action yet </strong>
  144. @endif
  145. <br>
  146. <table class='table table-striped table-condensed datatable'>
  147. <thead>
  148. <tr>
  149. <th>
  150. Criterion
  151. </th>
  152. <th>
  153. Number of Students Assessed
  154. </th>
  155. <th>
  156. Number of students that achieved the target
  157. </th>
  158. <th>
  159. %
  160. </th>
  161. <th>
  162. Outcomes
  163. </th>
  164. </tr>
  165. </thead>
  166. <tbody>
  167. @foreach ($activity->allActivityCriterionInfo() as $index5 => $ac_criterion)
  168. <tr>
  169. <td> {{ $ac_criterion->name }}</td>
  170. <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity->id) }}
  171. </td>
  172. <td>
  173. {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity->id) }}
  174. </td>
  175. <?php
  176. $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity->id);
  177. $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity->id);
  178. $percentage = 'N/A';
  179. $activity->getOutcomeReport();
  180. ?>
  181. @if ($out_att == 0)
  182. <td class="col-md-1 danger">{{ $percentage }}</td>
  183. @else
  184. <?php
  185. $percentage = round(($out_ach / $out_att) * 100, 2);
  186. ?>
  187. @if ($percentage >= $activity->rubric[0]->expected_percentage)
  188. <td class="col-md-1 success">{{ $percentage }}%</td>
  189. @else
  190. <td class="col-md-1 danger">{{ $percentage }}%</td>
  191. @endif
  192. @endif
  193. <td>
  194. @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
  195. {{ $index6 + 1 }}. <?php echo $outcome->name . "\n\n\n <br>"; ?>
  196. @endforeach
  197. </td>
  198. </tr>
  199. @endforeach
  200. </tbody>
  201. </table>
  202. <hr>
  203. <br>
  204. <h4>Perfomance by Learning Outcome Student</h4>
  205. <h5 style="display: inline; margin:30px;">Target by outcome: </h5>
  206. <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
  207. </p>
  208. <br>
  209. <h5 style="display: inline; margin:30px;">Expected percent of students achieving the target
  210. by outcome: </h5>
  211. <p style="display: inline;"> <i>
  212. <?php
  213. $expected = DB::table('target_outcomes_program')
  214. ->where('program_id', $course->program_id)
  215. ->where('semester_id', $course->semester_id)
  216. ->first(); //->expected_target;
  217. if (!$expected) {
  218. $expected = 'It has not been defined in the annual plan';
  219. }
  220. ?>
  221. {{ $expected }}
  222. </i>
  223. </p>
  224. <br>
  225. <table class='table table-striped table-condensed datatable'>
  226. <thead>
  227. <tr>
  228. <th>
  229. Outcome
  230. </th>
  231. <th>
  232. Number of Students Assessed
  233. </th>
  234. <th>
  235. Number of students that achieved the target
  236. </th>
  237. <th>
  238. %
  239. </th>
  240. </tr>
  241. </thead>
  242. <tbody>
  243. @foreach ($activity->getOutcomeReport() as $outcome)
  244. <tr>
  245. <td>
  246. {{ $outcome->name }}
  247. </td>
  248. <td>
  249. {{ $outcome->attempted }}
  250. </td>
  251. <td>
  252. {{ $outcome->achieved }}
  253. </td>
  254. @if ($outcome->percentage >= $expected)
  255. <td class="col-md-1 success">{{ $outcome->percentage }}%</td>
  256. @else
  257. <td class="col-md-1 danger">{{ $outcome->percentage }}%</td>
  258. @endif
  259. </tr>
  260. @endforeach
  261. </tbody>
  262. </table>
  263. <br>
  264. <hr>
  265. @endforeach
  266. @endforeach
  267. </div>
  268. @endforeach
  269. </div>
  270. </div>
  271. @section('included-js')
  272. @include('global._datatables_js')
  273. @stop
  274. @stop
  275. @section('javascript')
  276. @stop