No Description

new_assessment_report.blade.php 35KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  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._new_navigation')
  7. @elseif(Auth::user()->role == 3)
  8. @include('local.managers.pCoords._new_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. <?php set_time_limit(0); ?>
  26. @foreach ($courses as $index2 => $course)
  27. <li role="presentation">
  28. <a data-toggle="tab" href="#{{ $course->code }}-{{ $course->number }}"
  29. role="tab">{{ $course->code }}-{{ $course->number }}</a>
  30. </li>
  31. @endforeach
  32. </ul>
  33. <div id="allLists" class="tab-content">
  34. @foreach ($courses as $index2 => $course)
  35. <?php
  36. /*$sections_evaluating = Course::has('activities')
  37. ->whereNotNull('outcomes_attempted')
  38. ->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
  39. ->with(array('activities'=>function($query) use(&$outcome){
  40. $query->whereNotNull('outcomes_attempted');
  41. $query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');} ))
  42. ->where('code', $course->code)->where('number',$course->number)
  43. ->whereIn('semester_id', Session::get('semesters_ids'))
  44. ->get();*/
  45. $sections_evaluating = Course::has('activities')
  46. //->whereNotNull('outcomes_attempted')
  47. //->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
  48. ->with([
  49. 'activities' => function ($query) use (&$course) {
  50. $activities = DB::table('activities')
  51. ->join('activity_criterion', 'activity_criterion.activity_id', '=', 'activities.id')
  52. ->join('assessments', 'assessments.activity_criterion_id', '=', 'activity_criterion.id')
  53. //->join('criterion_objective_outcome', 'activity_criterion.criterion_id', '=', 'criterion_objective_outcome.criterion_id')
  54. ->join('courses', 'courses.id', '=', 'activities.course_id')
  55. ->where('courses.code', $course->code)
  56. ->where('courses.number', $course->number)
  57. ->where('activities.draft', 0)
  58. ->where('activities.diagnostic', 0)
  59. //->where('criterion_objective_outcome.outcome_id', $outcome->id)
  60. ->select('activity_id')
  61. ->lists('activity_id');
  62. //$query->whereNotNull('outcomes_attempted');
  63. //$query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');
  64. $query->whereIn('activities.id', $activities);
  65. },
  66. ])
  67. ->where('code', $course->code)
  68. ->where('number', $course->number)
  69. ->where('user_id', Auth::user()->id)
  70. ->whereIn('semester_id', Session::get('semesters_ids'))
  71. ->orderBy('semester_id')
  72. ->get();
  73. ?>
  74. <div role="tabpanel" class='tab-pane' id="{{ $course->code }}-{{ $course->number }}">
  75. @foreach ($sections_evaluating as $index3 => $section)
  76. <h3 style="text-align: center"> Course: {{ $course->code }}
  77. {{ $course->number }}-{{ $section->section }}</h3>
  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; margin:-30px;"> <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; margin:-30px;"> <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. <h5>Formative Actions: </h5>
  184. <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
  185. @if ($formative_actions)
  186. <p style="display: inline; margin:30px;">
  187. <u>{{ $formative_actions[0]->at_text }}:
  188. </u>
  189. <i>{{ $formative_actions[0]->description }}
  190. </i>
  191. </p>
  192. <!-- <h5 style="display: inline; margin:30px;"> -->
  193. <h5>
  194. Formative Action's Associated
  195. Criteria: </h5>
  196. <!-- <ul style="margin:30px;"> -->
  197. <ul>
  198. @foreach ($formative_actions as $criteria)
  199. <li> <i>{{ $criteria->name }} </i></li>
  200. @endforeach
  201. </ul>
  202. @endif
  203. <!-- <h5 style="display: inline; margin:30px;"> -->
  204. <h5>
  205. Assessment Comments: </h5>
  206. @if ($activity->assessment_comments != null)
  207. <p style="display: inline; margin:30px;">
  208. {{ $activity->assessment_comments }}
  209. </p>
  210. @endif
  211. <!-- <br> -->
  212. <hr>
  213. <!-- <br> -->
  214. <h4>Performance of Students by Learning Outcome</h4>
  215. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5><br>
  216. <!-- <p style="display: inline;"> -->
  217. {{ $activity->name }}
  218. <strong>({{ $activity->date }})</strong>
  219. <!-- </p> -->
  220. <br>
  221. <br>
  222. <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
  223. <p style="display: inline; margin:-30px;"> <i>>= 66.67% of the attempts</i>
  224. </p>
  225. <br>
  226. <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
  227. target
  228. by learning outcome: </h5>
  229. <p style="display: inline; margin:-30px;">
  230. <i>
  231. <?php
  232. $expected = DB::table('target_outcomes_program')
  233. ->where('program_id', $course->program_id)
  234. ->where('semester_id', $course->semester_id)
  235. ->first(); //->expected_target;
  236. if (!$expected) {
  237. $expected = 'It has not been defined in the annual plan';
  238. } else {
  239. $expected = $expected->expected_target;
  240. }
  241. ?>
  242. {{ $expected }}
  243. </i>
  244. </p>
  245. <br>
  246. <table class='table table-striped table-condensed datatable'>
  247. <thead>
  248. <tr>
  249. <th>
  250. Learning Outcome
  251. </th>
  252. <th>
  253. Number of Students Assessed
  254. </th>
  255. <th>
  256. Number of students that achieved the target
  257. </th>
  258. <th>
  259. %
  260. </th>
  261. </tr>
  262. </thead>
  263. <tbody>
  264. @foreach ($activity->getOutcomeReport() as $outcome)
  265. <tr>
  266. <td>
  267. {{ $outcome->name }}
  268. </td>
  269. <td>
  270. {{ $outcome->attempted }}
  271. </td>
  272. <td>
  273. {{ $outcome->achieved }}
  274. </td>
  275. @if ($outcome->percentage >= $expected)
  276. <td class="col-md-1 success">{{ $outcome->percentage }}%</td>
  277. @else
  278. <td class="col-md-1 danger">{{ $outcome->percentage }}%</td>
  279. @endif
  280. </tr>
  281. @endforeach
  282. </tbody>
  283. </table>
  284. <br>
  285. <hr>
  286. @endforeach
  287. <h4>Diagnostic Activities</h4>
  288. @foreach ($section->diagnosticActivities as $index4 => $activity)
  289. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
  290. <p style="display: inline;">{{ $activity->name }}
  291. <strong>({{ $activity->date }})</strong>
  292. </p>
  293. <br>
  294. <br>
  295. <h5 style="display: inline;">Performance Indicators: </h5>
  296. <?php
  297. Log::info($activity->rubric[0]);
  298. ?>
  299. <p style="display: inline;"><i>{{ $activity->rubric[0]->num_scales }} (
  300. <?php
  301. $titles = $activity->rubric[0]->getTitles();
  302. ?>
  303. @if (sizeof($titles) != 1)
  304. @foreach ($titles as $index5 => $rubric_title)
  305. @if ($index5 != $activity->rubric[0]->num_scales - 1)
  306. {{ $rubric_title->text }},
  307. @else
  308. and {{ $rubric_title->text }}
  309. @endif
  310. @endforeach
  311. )
  312. @else
  313. {{ $titles[0]->text }} )
  314. @endif
  315. </i></p>
  316. <br>
  317. <h5 style="display: inline;">Scale: </h5>
  318. @if ($activity->rubric[0]->max_score == 1)
  319. <p style="display: inline;">1 point scale</p>
  320. @else
  321. <p style="display: inline;">1-{{ $activity->rubric[0]->max_score }} point scale</p>
  322. @endif
  323. <br>
  324. <br>
  325. <h4>Performance of Students by Learning Outcome Criteria</h4>
  326. <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
  327. <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_points }} or more</i>
  328. </p>
  329. <br>
  330. <h5 style="display: inline; margin:30px;">Expected percent of students achieving the target
  331. by criterion: </h5>
  332. <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_percentage }} %</i>
  333. </p>
  334. <br>
  335. <table class='table table-striped table-condensed datatable'>
  336. <thead>
  337. <tr>
  338. <th>
  339. Criterion
  340. </th>
  341. <th>
  342. Number of Students Assessed
  343. </th>
  344. <th>
  345. Number of students that achieved the target
  346. </th>
  347. <th>
  348. %
  349. </th>
  350. <th>
  351. Learning Outcomes
  352. </th>
  353. </tr>
  354. </thead>
  355. <tbody>
  356. @foreach ($activity->allActivityCriterionInfo() as $index5 => $ac_criterion)
  357. <tr>
  358. <td> {{ $ac_criterion->name }}</td>
  359. <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity->id) }}
  360. </td>
  361. <td>
  362. {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity->id) }}
  363. </td>
  364. <?php
  365. $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity->id);
  366. $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity->id);
  367. $percentage = 'N/A';
  368. $activity->getOutcomeReport();
  369. ?>
  370. @if ($out_att == 0)
  371. <td class="col-md-1 danger">{{ $percentage }}</td>
  372. @else
  373. <?php
  374. $percentage = round(($out_ach / $out_att) * 100, 2);
  375. ?>
  376. @if ($percentage >= $activity->rubric[0]->expected_percentage)
  377. <td class="col-md-1 success">{{ $percentage }}%</td>
  378. @else
  379. <td class="col-md-1 danger">{{ $percentage }}%</td>
  380. @endif
  381. @endif
  382. <td>
  383. @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
  384. <?php echo $outcome->name . "\n\n\n <br>"; ?>
  385. @endforeach
  386. </td>
  387. </tr>
  388. @endforeach
  389. </tbody>
  390. </table>
  391. <br>
  392. <!-- <h5 style="display: inline; margin:30px;">Formative Actions: </h5> -->
  393. <h5>Formative Actions: </h5>
  394. <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
  395. @if ($formative_actions)
  396. <p style="display: inline;"> <u>{{ $formative_actions[0]->at_text }}:
  397. </u>
  398. <i>{{ $formative_actions[0]->description }}
  399. </i>
  400. </p>
  401. <br>
  402. <h5 style="display: inline; margin:30px;">Formative Action's Associated
  403. Criteria: </h5>
  404. <!-- <ul style="margin:30px;"> -->
  405. <ul>
  406. @foreach ($formative_actions as $criteria)
  407. <li> <i>{{ $criteria->name }} </i></li>
  408. @endforeach
  409. </ul>
  410. @endif
  411. <!-- <h5 style="display: inline; margin:30px;">Assessment Comments: </h5> -->
  412. <h5>Assessment Comments: </h5>
  413. @if ($activity->assessment_comments != null)
  414. <p style="display: inline;">{{ $activity->assessment_comments }}</p>
  415. @endif
  416. <!-- <br> -->
  417. <hr>
  418. <!-- <br> -->
  419. <h4>Performance of Students by Learning Outcome</h4>
  420. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5><br>
  421. <p style="display: inline;">{{ $activity->name }}
  422. <strong>({{ $activity->date }})</strong>
  423. </p>
  424. <br><br>
  425. <!-- <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5> -->
  426. <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
  427. <!-- <p style="display: inline;"> -->
  428. <i>>= 66.67% of the attempts</i>
  429. <!-- </p> -->
  430. <br>
  431. <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
  432. target
  433. by learning outcome: </h5>
  434. <p style="display: inline;"> <i>
  435. <?php
  436. $expected = DB::table('target_outcomes_program')
  437. ->where('program_id', $course->program_id)
  438. ->where('semester_id', $course->semester_id)
  439. ->first(); //->expected_target;
  440. if (!$expected) {
  441. $expected = 'It has not been defined in the annual plan';
  442. } else {
  443. $expected = $expected->expected_target;
  444. }
  445. ?>
  446. {{ $expected }}
  447. </i>
  448. </p>
  449. <br>
  450. <table class='table table-striped table-condensed datatable'>
  451. <thead>
  452. <tr>
  453. <th>
  454. Learning Outcome
  455. </th>
  456. <th>
  457. Number of Students Assessed
  458. </th>
  459. <th>
  460. Number of students that achieved the target
  461. </th>
  462. <th>
  463. %
  464. </th>
  465. </tr>
  466. </thead>
  467. <tbody>
  468. @foreach ($activity->getOutcomeReport() as $outcome)
  469. <tr>
  470. <td>
  471. {{ $outcome->name }}
  472. </td>
  473. <td>
  474. {{ $outcome->attempted }}
  475. </td>
  476. <td>
  477. {{ $outcome->achieved }}
  478. </td>
  479. @if ($outcome->percentage >= $expected)
  480. <td class="col-md-1 success">{{ $outcome->percentage }}%</td>
  481. @else
  482. <td class="col-md-1 danger">{{ $outcome->percentage }}%</td>
  483. @endif
  484. </tr>
  485. @endforeach
  486. </tbody>
  487. </table>
  488. <br>
  489. <hr>
  490. @endforeach
  491. @endforeach
  492. </div>
  493. @endforeach
  494. </div>
  495. </div>
  496. @section('included-js')
  497. @include('global._datatables_js')
  498. @stop
  499. @stop
  500. @section('javascript')
  501. @stop