No Description

new_assessment_report.blade.php 35KB

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