Нет описания

new_assessment_report.blade.php 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  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>Performance of Students 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. <table class='table table-striped table-condensed datatable'>
  128. <thead>
  129. <tr>
  130. <th>
  131. Criterion
  132. </th>
  133. <th>
  134. Number of Students Assessed
  135. </th>
  136. <th>
  137. Number of students that achieved the target
  138. </th>
  139. <th>
  140. %
  141. </th>
  142. <th>
  143. Learning Outcomes
  144. </th>
  145. </tr>
  146. </thead>
  147. <tbody>
  148. @foreach ($activity->allActivityCriterionInfo() as $index5 => $ac_criterion)
  149. <tr>
  150. <td> {{ $ac_criterion->name }}</td>
  151. <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity->id) }}
  152. </td>
  153. <td>
  154. {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity->id) }}
  155. </td>
  156. <?php
  157. $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity->id);
  158. $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity->id);
  159. $percentage = 'N/A';
  160. $activity->getOutcomeReport();
  161. ?>
  162. @if ($out_att == 0)
  163. <td class="col-md-1 danger">{{ $percentage }}</td>
  164. @else
  165. <?php
  166. $percentage = round(($out_ach / $out_att) * 100, 2);
  167. ?>
  168. @if ($percentage >= $activity->rubric[0]->expected_percentage)
  169. <td class="col-md-1 success">{{ $percentage }}%</td>
  170. @else
  171. <td class="col-md-1 danger">{{ $percentage }}%</td>
  172. @endif
  173. @endif
  174. <td>
  175. @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
  176. <?php echo $outcome->name . "\n\n\n <br>"; ?>
  177. @endforeach
  178. </td>
  179. </tr>
  180. @endforeach
  181. </tbody>
  182. </table>
  183. <br>
  184. <h5 style="display: inline; margin:30px;">Formative Actions: </h5>
  185. <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
  186. @if ($formative_actions)
  187. <p style="display: inline;"> <u>{{ $formative_actions[0]->at_text }}:
  188. </u>
  189. <i>{{ $formative_actions[0]->description }}
  190. </i>
  191. </p>
  192. <br>
  193. <h5 style="display: inline; margin:30px;">Formative Action's Associated
  194. Criteria: </h5>
  195. <ul style="margin:30px;">
  196. @foreach ($formative_actions as $criteria)
  197. <li> <i>{{ $criteria->name }} <i></li>
  198. @endforeach
  199. </ul>
  200. @endif
  201. <br>
  202. <h5 style="display: inline; margin:30px;">Assessment Comments: </h5>
  203. @if ($activity->assessment_comments != null)
  204. <p style="display: inline;">{{ $activity->assessment_comments }}</p>
  205. @endif
  206. <br>
  207. <hr>
  208. <br>
  209. <h4>Performance of Students by Learning Outcome</h4>
  210. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5><br>
  211. <p style="display: inline;">{{ $activity->name }}
  212. <strong>({{ $activity->date }})</strong>
  213. </p>
  214. <h5 style="display: inline; margin:30px;">Target by outcome: </h5>
  215. <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
  216. </p>
  217. <br>
  218. <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
  219. target
  220. by outcome: </h5>
  221. <p style="display: inline;"> <i>
  222. <?php
  223. $expected = DB::table('target_outcomes_program')
  224. ->where('program_id', $course->program_id)
  225. ->where('semester_id', $course->semester_id)
  226. ->first(); //->expected_target;
  227. if (!$expected) {
  228. $expected = 'It has not been defined in the annual plan';
  229. }
  230. else{
  231. $expected = $expected->expected_target;
  232. }
  233. ?>
  234. {{ $expected }}
  235. </i>
  236. </p>
  237. <br>
  238. <table class='table table-striped table-condensed datatable'>
  239. <thead>
  240. <tr>
  241. <th>
  242. Learning Outcome
  243. </th>
  244. <th>
  245. Number of Students Assessed
  246. </th>
  247. <th>
  248. Number of students that achieved the target
  249. </th>
  250. <th>
  251. %
  252. </th>
  253. </tr>
  254. </thead>
  255. <tbody>
  256. @foreach ($activity->getOutcomeReport() as $outcome)
  257. <tr>
  258. <td>
  259. {{ $outcome->name }}
  260. </td>
  261. <td>
  262. {{ $outcome->attempted }}
  263. </td>
  264. <td>
  265. {{ $outcome->achieved }}
  266. </td>
  267. @if ($outcome->percentage >= $expected)
  268. <td class="col-md-1 success">{{ $outcome->percentage }}%</td>
  269. @else
  270. <td class="col-md-1 danger">{{ $outcome->percentage }}%</td>
  271. @endif
  272. </tr>
  273. @endforeach
  274. </tbody>
  275. </table>
  276. <br>
  277. <hr>
  278. @endforeach
  279. @endforeach
  280. </div>
  281. @endforeach
  282. </div>
  283. </div>
  284. @section('included-js')
  285. @include('global._datatables_js')
  286. @stop
  287. @stop
  288. @section('javascript')
  289. @stop