No Description

new_assessment_report.blade.php 33KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  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;"> <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. <br>
  213. <br>
  214. <h5 style="display: inline; margin:30px;">Target by learning 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 learning 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. <h4>Diagnostic Activities</h4>
  280. @foreach ($section->diagnosticActivities as $index4 => $activity)
  281. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
  282. <p style="display: inline;">{{ $activity->name }}
  283. <strong>({{ $activity->date }})</strong>
  284. </p>
  285. <br>
  286. <br>
  287. <h5 style="display: inline;">Performance Indicators: </h5>
  288. <?php
  289. Log::info($activity->rubric[0]);
  290. ?>
  291. <p style="display: inline;"><i>{{ $activity->rubric[0]->num_scales }} (
  292. <?php
  293. $titles = $activity->rubric[0]->getTitles();
  294. ?>
  295. @if (sizeof($titles) != 1)
  296. @foreach ($titles as $index5 => $rubric_title)
  297. @if ($index5 != $activity->rubric[0]->num_scales - 1)
  298. {{ $rubric_title->text }},
  299. @else
  300. and {{ $rubric_title->text }}
  301. @endif
  302. @endforeach
  303. )
  304. @else
  305. {{ $titles[0]->text }} )
  306. @endif
  307. </i></p>
  308. <br>
  309. <h5 style="display: inline;">Scale: </h5>
  310. @if ($activity->rubric[0]->max_score == 1)
  311. <p style="display: inline;">1 point scale</p>
  312. @else
  313. <p style="display: inline;">1-{{ $activity->rubric[0]->max_score }} point scale</p>
  314. @endif
  315. <br>
  316. <br>
  317. <h4>Performance of Students by Learning Outcome Criteria</h4>
  318. <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
  319. <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_points }} or more</i>
  320. </p>
  321. <br>
  322. <h5 style="display: inline; margin:30px;">Expected percent of students achieving the target
  323. by criterion: </h5>
  324. <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_percentage }} %</i>
  325. </p>
  326. <br>
  327. <table class='table table-striped table-condensed datatable'>
  328. <thead>
  329. <tr>
  330. <th>
  331. Criterion
  332. </th>
  333. <th>
  334. Number of Students Assessed
  335. </th>
  336. <th>
  337. Number of students that achieved the target
  338. </th>
  339. <th>
  340. %
  341. </th>
  342. <th>
  343. Learning Outcomes
  344. </th>
  345. </tr>
  346. </thead>
  347. <tbody>
  348. @foreach ($activity->allActivityCriterionInfo() as $index5 => $ac_criterion)
  349. <tr>
  350. <td> {{ $ac_criterion->name }}</td>
  351. <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity->id) }}
  352. </td>
  353. <td>
  354. {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity->id) }}
  355. </td>
  356. <?php
  357. $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity->id);
  358. $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity->id);
  359. $percentage = 'N/A';
  360. $activity->getOutcomeReport();
  361. ?>
  362. @if ($out_att == 0)
  363. <td class="col-md-1 danger">{{ $percentage }}</td>
  364. @else
  365. <?php
  366. $percentage = round(($out_ach / $out_att) * 100, 2);
  367. ?>
  368. @if ($percentage >= $activity->rubric[0]->expected_percentage)
  369. <td class="col-md-1 success">{{ $percentage }}%</td>
  370. @else
  371. <td class="col-md-1 danger">{{ $percentage }}%</td>
  372. @endif
  373. @endif
  374. <td>
  375. @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
  376. <?php echo $outcome->name . "\n\n\n <br>"; ?>
  377. @endforeach
  378. </td>
  379. </tr>
  380. @endforeach
  381. </tbody>
  382. </table>
  383. <br>
  384. <h5 style="display: inline; margin:30px;">Formative Actions: </h5>
  385. <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
  386. @if ($formative_actions)
  387. <p style="display: inline;"> <u>{{ $formative_actions[0]->at_text }}:
  388. </u>
  389. <i>{{ $formative_actions[0]->description }}
  390. </i>
  391. </p>
  392. <br>
  393. <h5 style="display: inline; margin:30px;">Formative Action's Associated
  394. Criteria: </h5>
  395. <ul style="margin:30px;">
  396. @foreach ($formative_actions as $criteria)
  397. <li> <i>{{ $criteria->name }} <i></li>
  398. @endforeach
  399. </ul>
  400. @endif
  401. <br>
  402. <h5 style="display: inline; margin:30px;">Assessment Comments: </h5>
  403. @if ($activity->assessment_comments != null)
  404. <p style="display: inline;">{{ $activity->assessment_comments }}</p>
  405. @endif
  406. <br>
  407. <hr>
  408. <br>
  409. <h4>Performance of Students by Learning Outcome</h4>
  410. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5><br>
  411. <p style="display: inline;">{{ $activity->name }}
  412. <strong>({{ $activity->date }})</strong>
  413. </p>
  414. <br><br>
  415. <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
  416. <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
  417. </p>
  418. <br>
  419. <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
  420. target
  421. by learning outcome: </h5>
  422. <p style="display: inline;"> <i>
  423. <?php
  424. $expected = DB::table('target_outcomes_program')
  425. ->where('program_id', $course->program_id)
  426. ->where('semester_id', $course->semester_id)
  427. ->first(); //->expected_target;
  428. if (!$expected) {
  429. $expected = 'It has not been defined in the annual plan';
  430. }
  431. else{
  432. $expected = $expected->expected_target;
  433. }
  434. ?>
  435. {{ $expected }}
  436. </i>
  437. </p>
  438. <br>
  439. <table class='table table-striped table-condensed datatable'>
  440. <thead>
  441. <tr>
  442. <th>
  443. Learning Outcome
  444. </th>
  445. <th>
  446. Number of Students Assessed
  447. </th>
  448. <th>
  449. Number of students that achieved the target
  450. </th>
  451. <th>
  452. %
  453. </th>
  454. </tr>
  455. </thead>
  456. <tbody>
  457. @foreach ($activity->getOutcomeReport() as $outcome)
  458. <tr>
  459. <td>
  460. {{ $outcome->name }}
  461. </td>
  462. <td>
  463. {{ $outcome->attempted }}
  464. </td>
  465. <td>
  466. {{ $outcome->achieved }}
  467. </td>
  468. @if ($outcome->percentage >= $expected)
  469. <td class="col-md-1 success">{{ $outcome->percentage }}%</td>
  470. @else
  471. <td class="col-md-1 danger">{{ $outcome->percentage }}%</td>
  472. @endif
  473. </tr>
  474. @endforeach
  475. </tbody>
  476. </table>
  477. <br>
  478. <hr>
  479. @endforeach
  480. @endforeach
  481. </div>
  482. @endforeach
  483. </div>
  484. </div>
  485. @section('included-js')
  486. @include('global._datatables_js')
  487. @stop
  488. @stop
  489. @section('javascript')
  490. @stop