No Description

new_assessment_report.blade.php 33KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  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. <h4> Non-diagnostic Activities</h4>
  78. @foreach ($section->publishedActivities as $index4 => $activity)
  79. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
  80. <p style="display: inline;">{{ $activity->name }}
  81. <strong>({{ $activity->date }})</strong>
  82. </p>
  83. <br>
  84. <br>
  85. <h5 style="display: inline;">Performance Indicators: </h5>
  86. <?php
  87. Log::info($activity->rubric[0]);
  88. ?>
  89. <p style="display: inline;"><i>{{ $activity->rubric[0]->num_scales }} (
  90. <?php
  91. $titles = $activity->rubric[0]->getTitles();
  92. ?>
  93. @if (sizeof($titles) != 1)
  94. @foreach ($titles as $index5 => $rubric_title)
  95. @if ($index5 != $activity->rubric[0]->num_scales - 1)
  96. {{ $rubric_title->text }},
  97. @else
  98. and {{ $rubric_title->text }}
  99. @endif
  100. @endforeach
  101. )
  102. @else
  103. {{ $titles[0]->text }} )
  104. @endif
  105. </i></p>
  106. <br>
  107. <h5 style="display: inline;">Scale: </h5>
  108. @if ($activity->rubric[0]->max_score == 1)
  109. <p style="display: inline;">1 point scale</p>
  110. @else
  111. <p style="display: inline;">1-{{ $activity->rubric[0]->max_score }} point scale</p>
  112. @endif
  113. <br>
  114. <br>
  115. <h4>Performance of Students by Learning Outcome Criteria</h4>
  116. <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
  117. <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_points }} or more</i>
  118. </p>
  119. <br>
  120. <h5 style="display: inline; margin:30px;">Expected percent of students achieving the target
  121. by criterion: </h5>
  122. <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_percentage }} %</i>
  123. </p>
  124. <br>
  125. <table class='table table-striped table-condensed datatable'>
  126. <thead>
  127. <tr>
  128. <th>
  129. Criterion
  130. </th>
  131. <th>
  132. Number of Students Assessed
  133. </th>
  134. <th>
  135. Number of students that achieved the target
  136. </th>
  137. <th>
  138. %
  139. </th>
  140. <th>
  141. Learning Outcomes
  142. </th>
  143. </tr>
  144. </thead>
  145. <tbody>
  146. @foreach ($activity->allActivityCriterionInfo() as $index5 => $ac_criterion)
  147. <tr>
  148. <td> {{ $ac_criterion->name }}</td>
  149. <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity->id) }}
  150. </td>
  151. <td>
  152. {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity->id) }}
  153. </td>
  154. <?php
  155. $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity->id);
  156. $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity->id);
  157. $percentage = 'N/A';
  158. $activity->getOutcomeReport();
  159. ?>
  160. @if ($out_att == 0)
  161. <td class="col-md-1 danger">{{ $percentage }}</td>
  162. @else
  163. <?php
  164. $percentage = round(($out_ach / $out_att) * 100, 2);
  165. ?>
  166. @if ($percentage >= $activity->rubric[0]->expected_percentage)
  167. <td class="col-md-1 success">{{ $percentage }}%</td>
  168. @else
  169. <td class="col-md-1 danger">{{ $percentage }}%</td>
  170. @endif
  171. @endif
  172. <td>
  173. @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
  174. <?php echo $outcome->name . "\n\n\n <br>"; ?>
  175. @endforeach
  176. </td>
  177. </tr>
  178. @endforeach
  179. </tbody>
  180. </table>
  181. <br>
  182. <h5 style="display: inline; margin:30px;">Formative Actions: </h5>
  183. <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
  184. @if ($formative_actions)
  185. <p style="display: inline;"> <u>{{ $formative_actions[0]->at_text }}:
  186. </u>
  187. <i>{{ $formative_actions[0]->description }}
  188. </i>
  189. </p>
  190. <br>
  191. <h5 style="display: inline; margin:30px;">Formative Action's Associated
  192. Criteria: </h5>
  193. <ul style="margin:30px;">
  194. @foreach ($formative_actions as $criteria)
  195. <li> <i>{{ $criteria->name }} <i></li>
  196. @endforeach
  197. </ul>
  198. @endif
  199. <br>
  200. <h5 style="display: inline; margin:30px;">Assessment Comments: </h5>
  201. @if ($activity->assessment_comments != null)
  202. <p style="display: inline;">{{ $activity->assessment_comments }}</p>
  203. @endif
  204. <br>
  205. <hr>
  206. <br>
  207. <h4>Performance of Students by Learning Outcome</h4>
  208. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5><br>
  209. <p style="display: inline;">{{ $activity->name }}
  210. <strong>({{ $activity->date }})</strong>
  211. </p>
  212. <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
  213. <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
  214. </p>
  215. <br>
  216. <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
  217. target
  218. by learning outcome: </h5>
  219. <p style="display: inline;"> <i>
  220. <?php
  221. $expected = DB::table('target_outcomes_program')
  222. ->where('program_id', $course->program_id)
  223. ->where('semester_id', $course->semester_id)
  224. ->first(); //->expected_target;
  225. if (!$expected) {
  226. $expected = 'It has not been defined in the annual plan';
  227. }
  228. else{
  229. $expected = $expected->expected_target;
  230. }
  231. ?>
  232. {{ $expected }}
  233. </i>
  234. </p>
  235. <br>
  236. <table class='table table-striped table-condensed datatable'>
  237. <thead>
  238. <tr>
  239. <th>
  240. Learning Outcome
  241. </th>
  242. <th>
  243. Number of Students Assessed
  244. </th>
  245. <th>
  246. Number of students that achieved the target
  247. </th>
  248. <th>
  249. %
  250. </th>
  251. </tr>
  252. </thead>
  253. <tbody>
  254. @foreach ($activity->getOutcomeReport() as $outcome)
  255. <tr>
  256. <td>
  257. {{ $outcome->name }}
  258. </td>
  259. <td>
  260. {{ $outcome->attempted }}
  261. </td>
  262. <td>
  263. {{ $outcome->achieved }}
  264. </td>
  265. @if ($outcome->percentage >= $expected)
  266. <td class="col-md-1 success">{{ $outcome->percentage }}%</td>
  267. @else
  268. <td class="col-md-1 danger">{{ $outcome->percentage }}%</td>
  269. @endif
  270. </tr>
  271. @endforeach
  272. </tbody>
  273. </table>
  274. <br>
  275. <hr>
  276. @endforeach
  277. <h4>Diagnostic Activities</h4>
  278. @foreach ($section->diagnosticActivities as $index4 => $activity)
  279. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
  280. <p style="display: inline;">{{ $activity->name }}
  281. <strong>({{ $activity->date }})</strong>
  282. </p>
  283. <br>
  284. <br>
  285. <h5 style="display: inline;">Performance Indicators: </h5>
  286. <?php
  287. Log::info($activity->rubric[0]);
  288. ?>
  289. <p style="display: inline;"><i>{{ $activity->rubric[0]->num_scales }} (
  290. <?php
  291. $titles = $activity->rubric[0]->getTitles();
  292. ?>
  293. @if (sizeof($titles) != 1)
  294. @foreach ($titles as $index5 => $rubric_title)
  295. @if ($index5 != $activity->rubric[0]->num_scales - 1)
  296. {{ $rubric_title->text }},
  297. @else
  298. and {{ $rubric_title->text }}
  299. @endif
  300. @endforeach
  301. )
  302. @else
  303. {{ $titles[0]->text }} )
  304. @endif
  305. </i></p>
  306. <br>
  307. <h5 style="display: inline;">Scale: </h5>
  308. @if ($activity->rubric[0]->max_score == 1)
  309. <p style="display: inline;">1 point scale</p>
  310. @else
  311. <p style="display: inline;">1-{{ $activity->rubric[0]->max_score }} point scale</p>
  312. @endif
  313. <br>
  314. <br>
  315. <h4>Performance of Students by Learning Outcome Criteria</h4>
  316. <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
  317. <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_points }} or more</i>
  318. </p>
  319. <br>
  320. <h5 style="display: inline; margin:30px;">Expected percent of students achieving the target
  321. by criterion: </h5>
  322. <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_percentage }} %</i>
  323. </p>
  324. <br>
  325. <table class='table table-striped table-condensed datatable'>
  326. <thead>
  327. <tr>
  328. <th>
  329. Criterion
  330. </th>
  331. <th>
  332. Number of Students Assessed
  333. </th>
  334. <th>
  335. Number of students that achieved the target
  336. </th>
  337. <th>
  338. %
  339. </th>
  340. <th>
  341. Learning Outcomes
  342. </th>
  343. </tr>
  344. </thead>
  345. <tbody>
  346. @foreach ($activity->allActivityCriterionInfo() as $index5 => $ac_criterion)
  347. <tr>
  348. <td> {{ $ac_criterion->name }}</td>
  349. <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity->id) }}
  350. </td>
  351. <td>
  352. {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity->id) }}
  353. </td>
  354. <?php
  355. $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity->id);
  356. $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity->id);
  357. $percentage = 'N/A';
  358. $activity->getOutcomeReport();
  359. ?>
  360. @if ($out_att == 0)
  361. <td class="col-md-1 danger">{{ $percentage }}</td>
  362. @else
  363. <?php
  364. $percentage = round(($out_ach / $out_att) * 100, 2);
  365. ?>
  366. @if ($percentage >= $activity->rubric[0]->expected_percentage)
  367. <td class="col-md-1 success">{{ $percentage }}%</td>
  368. @else
  369. <td class="col-md-1 danger">{{ $percentage }}%</td>
  370. @endif
  371. @endif
  372. <td>
  373. @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
  374. <?php echo $outcome->name . "\n\n\n <br>"; ?>
  375. @endforeach
  376. </td>
  377. </tr>
  378. @endforeach
  379. </tbody>
  380. </table>
  381. <br>
  382. <h5 style="display: inline; margin:30px;">Formative Actions: </h5>
  383. <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
  384. @if ($formative_actions)
  385. <p style="display: inline;"> <u>{{ $formative_actions[0]->at_text }}:
  386. </u>
  387. <i>{{ $formative_actions[0]->description }}
  388. </i>
  389. </p>
  390. <br>
  391. <h5 style="display: inline; margin:30px;">Formative Action's Associated
  392. Criteria: </h5>
  393. <ul style="margin:30px;">
  394. @foreach ($formative_actions as $criteria)
  395. <li> <i>{{ $criteria->name }} <i></li>
  396. @endforeach
  397. </ul>
  398. @endif
  399. <br>
  400. <h5 style="display: inline; margin:30px;">Assessment Comments: </h5>
  401. @if ($activity->assessment_comments != null)
  402. <p style="display: inline;">{{ $activity->assessment_comments }}</p>
  403. @endif
  404. <br>
  405. <hr>
  406. <br>
  407. <h4>Performance of Students by Learning Outcome</h4>
  408. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5><br>
  409. <p style="display: inline;">{{ $activity->name }}
  410. <strong>({{ $activity->date }})</strong>
  411. </p>
  412. <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
  413. <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
  414. </p>
  415. <br>
  416. <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
  417. target
  418. by learning outcome: </h5>
  419. <p style="display: inline;"> <i>
  420. <?php
  421. $expected = DB::table('target_outcomes_program')
  422. ->where('program_id', $course->program_id)
  423. ->where('semester_id', $course->semester_id)
  424. ->first(); //->expected_target;
  425. if (!$expected) {
  426. $expected = 'It has not been defined in the annual plan';
  427. }
  428. else{
  429. $expected = $expected->expected_target;
  430. }
  431. ?>
  432. {{ $expected }}
  433. </i>
  434. </p>
  435. <br>
  436. <table class='table table-striped table-condensed datatable'>
  437. <thead>
  438. <tr>
  439. <th>
  440. Learning Outcome
  441. </th>
  442. <th>
  443. Number of Students Assessed
  444. </th>
  445. <th>
  446. Number of students that achieved the target
  447. </th>
  448. <th>
  449. %
  450. </th>
  451. </tr>
  452. </thead>
  453. <tbody>
  454. @foreach ($activity->getOutcomeReport() as $outcome)
  455. <tr>
  456. <td>
  457. {{ $outcome->name }}
  458. </td>
  459. <td>
  460. {{ $outcome->attempted }}
  461. </td>
  462. <td>
  463. {{ $outcome->achieved }}
  464. </td>
  465. @if ($outcome->percentage >= $expected)
  466. <td class="col-md-1 success">{{ $outcome->percentage }}%</td>
  467. @else
  468. <td class="col-md-1 danger">{{ $outcome->percentage }}%</td>
  469. @endif
  470. </tr>
  471. @endforeach
  472. </tbody>
  473. </table>
  474. <br>
  475. <hr>
  476. @endforeach
  477. @endforeach
  478. </div>
  479. @endforeach
  480. </div>
  481. </div>
  482. @section('included-js')
  483. @include('global._datatables_js')
  484. @stop
  485. @stop
  486. @section('javascript')
  487. @stop