No Description

new_assessment_report.blade.php 53KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  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. @endif
  10. @stop
  11. @section('main')
  12. <div class="row">
  13. <div class="col-md-12">
  14. <p>This report contains performance information for all your Program's assessed courses during the following
  15. semester(s):</p>
  16. <ul>
  17. @foreach (Session::get('semesters_info') as $semester_info)
  18. <li>{{ $semester_info }}</li>
  19. @endforeach
  20. </ul>
  21. <?php set_time_limit(0); ?>
  22. @foreach ($schools as $school)
  23. <h3>{{ $school->name }}</h3>
  24. <hr>
  25. @if (!$school->programs->isEmpty())
  26. <h3>Table of Contents</h3>
  27. <ol id="table-of-contents" class="upper-roman">
  28. </ol>
  29. @foreach ($school->programs as $program)
  30. {{-- <ul id='levelTabs' class="nav nav-tabs" role="tablist">
  31. <!-- For each grouped course -->
  32. @foreach ($program->courses as $index2 => $course)
  33. <li role="presentation">
  34. <a data-toggle="tab" href="#{{ $course->code }}-{{ $course->number }}"
  35. role="tab">{{ $course->code }}-{{ $course->number }}</a>
  36. </li>
  37. @endforeach
  38. </ul>
  39. <d id="allLists" class="tab-content"> --}}
  40. <div class="panel panel-default">
  41. <div class="panel-heading">
  42. <h3 class="panel-title">{{ $program->name }}</h3>
  43. </div>
  44. <div class="panel-body">
  45. <ul class="nav navbars" role="tablist">
  46. @foreach ($program->courses as $index2 => $course)
  47. <li role="presentation">
  48. <a data-toggle="tab" href="#{{ $course->code }}-{{ $course->number }}"
  49. role="tab">{{ $course->code }}-{{ $course->number }}</a>
  50. </li>
  51. @endforeach
  52. </ul>
  53. <!-- If grouped course has activities that evaluate the outcome -->
  54. @foreach ($program->courses as $index2 => $course)
  55. <?php
  56. /*$sections_evaluating = Course::has('activities')
  57. ->whereNotNull('outcomes_attempted')
  58. ->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
  59. ->with(array('activities'=>function($query) use(&$outcome){
  60. $query->whereNotNull('outcomes_attempted');
  61. $query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');} ))
  62. ->where('code', $course->code)->where('number',$course->number)
  63. ->whereIn('semester_id', Session::get('semesters_ids'))
  64. ->get();*/
  65. $sections_evaluating = Course::has('activities')
  66. //->whereNotNull('outcomes_attempted')
  67. //->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
  68. ->with([
  69. 'activities' => function ($query) use (&$course) {
  70. $activities = DB::table('activities')
  71. ->join('activity_criterion', 'activity_criterion.activity_id', '=', 'activities.id')
  72. ->join('assessments', 'assessments.activity_criterion_id', '=', 'activity_criterion.id')
  73. //->join('criterion_objective_outcome', 'activity_criterion.criterion_id', '=', 'criterion_objective_outcome.criterion_id')
  74. ->join('courses', 'courses.id', '=', 'activities.course_id')
  75. ->where('courses.code', $course->code)
  76. ->where('courses.number', $course->number)
  77. ->where('activities.draft', 0)
  78. ->where('activities.diagnostic', 0)
  79. //->where('criterion_objective_outcome.outcome_id', $outcome->id)
  80. ->select('activity_id')
  81. ->lists('activity_id');
  82. //$query->whereNotNull('outcomes_attempted');
  83. //$query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');
  84. $query->whereIn('id', $activities);
  85. },
  86. ])
  87. ->where('code', $course->code)
  88. ->where('number', $course->number)
  89. ->whereIn('semester_id', Session::get('semesters_ids'))
  90. ->orderBy('semester_id')
  91. ->get();
  92. ?>
  93. <div role="tabpanel" class='tab-pane'
  94. id="{{ $course->code }}-{{ $course->number }}">
  95. @foreach ($sections_evaluating as $index3 => $section)
  96. @if (!$section->publishedActivities->isEmpty())
  97. <h3 style="text-align: center"> Course: {{ $course->code }}
  98. {{ $course->number }}-{{ $section->section }} </h3>
  99. @endif
  100. @foreach ($section->publishedActivities as $index4 => $activity)
  101. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
  102. <p style="display: inline;">{{ $activity->name }}
  103. <strong>({{ $activity->date }})</strong>
  104. </p>
  105. <br>
  106. <br>
  107. <h5 style="display: inline;">Performance Indicators: </h5>
  108. <?php
  109. Log::info($activity->rubric[0]);
  110. ?>
  111. <p style="display: inline;"><i>{{ $activity->rubric[0]->num_scales }} (
  112. <?php
  113. $titles = $activity->rubric[0]->getTitles();
  114. ?>
  115. @if (sizeof($titles) != 1)
  116. @foreach ($titles as $index5 => $rubric_title)
  117. @if ($index5 != $activity->rubric[0]->num_scales - 1)
  118. {{ $rubric_title->text }},
  119. @else
  120. and {{ $rubric_title->text }}
  121. @endif
  122. @endforeach
  123. )
  124. @else
  125. {{ $titles[0]->text }} )
  126. @endif
  127. </i></p>
  128. <br>
  129. <h5 style="display: inline;">Scale: </h5>
  130. @if ($activity->rubric[0]->max_score == 1)
  131. <p style="display: inline;">1 point scale</p>
  132. @else
  133. <p style="display: inline;">1-{{ $activity->rubric[0]->max_score }}
  134. point
  135. scale
  136. </p>
  137. @endif
  138. <br>
  139. <br>
  140. <h4>Performance of Students by Learning Outcome Criteria</h4>
  141. <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
  142. <p style="display: inline;">
  143. <i>{{ $activity->rubric[0]->expected_points }}
  144. or
  145. more</i>
  146. </p>
  147. <br>
  148. <h5 style="display: inline; margin:30px;">Expected percent of students
  149. achieving
  150. the
  151. target by criterion: </h5>
  152. <p style="display: inline;">
  153. <i>{{ $activity->rubric[0]->expected_percentage }}
  154. %</i>
  155. </p>
  156. <br>
  157. <table class='table table-striped table-condensed datatable'>
  158. <thead>
  159. <tr>
  160. <th>
  161. Criterion
  162. </th>
  163. <th>
  164. Number of Students Assessed
  165. </th>
  166. <th>
  167. Number of students that achieved the target
  168. </th>
  169. <th>
  170. %
  171. </th>
  172. <th>
  173. Learning Outcomes
  174. </th>
  175. </tr>
  176. </thead>
  177. <tbody>
  178. @foreach ($activity->allActivityCriterionInfo() as $index5 => $ac_criterion)
  179. <tr>
  180. <td> {{ $ac_criterion->name }}</td>
  181. <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity->id) }}
  182. </td>
  183. <td>
  184. {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity->id) }}
  185. </td>
  186. <?php
  187. $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity->id);
  188. $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity->id);
  189. $percentage = 'N/A';
  190. $activity->getOutcomeReport();
  191. ?>
  192. @if ($out_att == 0)
  193. <td class="col-md-1 danger">{{ $percentage }}</td>
  194. @else
  195. <?php
  196. $percentage = round(($out_ach / $out_att) * 100, 2);
  197. ?>
  198. @if ($percentage >= $activity->rubric[0]->expected_percentage)
  199. <td class="col-md-1 success">{{ $percentage }}%
  200. </td>
  201. @else
  202. <td class="col-md-1 danger">{{ $percentage }}%
  203. </td>
  204. @endif
  205. @endif
  206. <td>
  207. @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
  208. <?php echo $outcome->name . "\n\n\n <br>"; ?>
  209. @endforeach
  210. </td>
  211. </tr>
  212. @endforeach
  213. </tbody>
  214. </table>
  215. <br>
  216. <h5 style="display: inline; margin:30px;">Formative Actions: </h5>
  217. <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
  218. @if ($formative_actions)
  219. <p style="display: inline;">
  220. <u>{{ $formative_actions[0]->at_text }}:
  221. </u>
  222. <i>{{ $formative_actions[0]->description }}
  223. </i>
  224. </p>
  225. <br>
  226. <h5 style="display: inline; margin:30px;">Formative Action's Associated
  227. Criteria: </h5>
  228. <ul style="margin:30px;">
  229. @foreach ($formative_actions as $criteria)
  230. <li> <i>{{ $criteria->name }} </i></li>
  231. @endforeach
  232. </ul>
  233. @endif
  234. <h5 style="display: inline; margin:30px;">Assessment Comments: </h5>
  235. @if ($activity->assessment_comments != null)
  236. <p style="display: inline;">{{ $activity->assessment_comments }}</p>
  237. @endif
  238. <br>
  239. <hr>
  240. <br>
  241. <h4>Performance of Students by Learning Outcome</h4>
  242. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
  243. <p style="display: inline;">{{ $activity->name }}
  244. <strong>({{ $activity->date }})</strong>
  245. </p>
  246. <br>
  247. <br>
  248. <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
  249. <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
  250. </p>
  251. <br>
  252. <h5 style="display: inline; margin:30px;">Expected percent of students
  253. achieving
  254. the
  255. target by learning outcome: </h5>
  256. <p style="display: inline;"> <i>
  257. <?php
  258. $expected = DB::table('target_outcomes_program')
  259. ->where('program_id', $course->program_id)
  260. ->where('semester_id', $course->semester_id)
  261. ->first(); //->expected_target;
  262. if (!$expected) {
  263. $expected = 'It has not been defined in the annual plan';
  264. } else {
  265. $expected = $expected->expected_target;
  266. }
  267. ?>
  268. {{ $expected }}
  269. </i>
  270. </p>
  271. <br>
  272. <table class='table table-striped table-condensed datatable'>
  273. <thead>
  274. <tr>
  275. <th>
  276. Learning Outcome
  277. </th>
  278. <th>
  279. Number of Students Assessed
  280. </th>
  281. <th>
  282. Number of students that achieved the target
  283. </th>
  284. <th>
  285. %
  286. </th>
  287. </tr>
  288. </thead>
  289. <tbody>
  290. @foreach ($activity->getOutcomeReport() as $outcome)
  291. <tr>
  292. <td>
  293. {{ $outcome->name }}
  294. </td>
  295. <td>
  296. {{ $outcome->attempted }}
  297. </td>
  298. <td>
  299. {{ $outcome->achieved }}
  300. </td>
  301. @if ($outcome->percentage >= $expected)
  302. <td class="col-md-1 success">
  303. {{ $outcome->percentage }}%
  304. </td>
  305. @else
  306. <td class="col-md-1 danger">
  307. {{ $outcome->percentage }}%
  308. </td>
  309. @endif
  310. </tr>
  311. @endforeach
  312. </tbody>
  313. </table>
  314. <br>
  315. <hr>
  316. @endforeach
  317. <h4>Diagnostic Activities</h4>
  318. @foreach ($section->diagnosticActivities as $index4 => $activity)
  319. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
  320. <p style="display: inline;">{{ $activity->name }}
  321. <strong>({{ $activity->date }})</strong>
  322. </p>
  323. <br>
  324. <br>
  325. <h5 style="display: inline;">Performance Indicators: </h5>
  326. <?php
  327. Log::info($activity->rubric[0]);
  328. ?>
  329. <p style="display: inline;"><i>{{ $activity->rubric[0]->num_scales }} (
  330. <?php
  331. $titles = $activity->rubric[0]->getTitles();
  332. ?>
  333. @if (sizeof($titles) != 1)
  334. @foreach ($titles as $index5 => $rubric_title)
  335. @if ($index5 != $activity->rubric[0]->num_scales - 1)
  336. {{ $rubric_title->text }},
  337. @else
  338. and {{ $rubric_title->text }}
  339. @endif
  340. @endforeach
  341. )
  342. @else
  343. {{ $titles[0]->text }} )
  344. @endif
  345. </i></p>
  346. <br>
  347. <h5 style="display: inline;">Scale: </h5>
  348. @if ($activity->rubric[0]->max_score == 1)
  349. <p style="display: inline;">1 point scale</p>
  350. @else
  351. <p style="display: inline;">1-{{ $activity->rubric[0]->max_score }}
  352. point
  353. scale
  354. </p>
  355. @endif
  356. <br>
  357. <br>
  358. <h4>Performance of Students by Learning Outcome Criteria</h4>
  359. <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
  360. <p style="display: inline;">
  361. <i>{{ $activity->rubric[0]->expected_points }}
  362. or
  363. more</i>
  364. </p>
  365. <br>
  366. <h5 style="display: inline; margin:30px;">Expected percent of students
  367. achieving
  368. the
  369. target by criterion: </h5>
  370. <p style="display: inline;">
  371. <i>{{ $activity->rubric[0]->expected_percentage }}
  372. %</i>
  373. </p>
  374. <br>
  375. <table class='table table-striped table-condensed datatable'>
  376. <thead>
  377. <tr>
  378. <th>
  379. Criterion
  380. </th>
  381. <th>
  382. Number of Students Assessed
  383. </th>
  384. <th>
  385. Number of students that achieved the target
  386. </th>
  387. <th>
  388. %
  389. </th>
  390. <th>
  391. Learning Outcomes
  392. </th>
  393. </tr>
  394. </thead>
  395. <tbody>
  396. @foreach ($activity->allActivityCriterionInfo() as $index5 => $ac_criterion)
  397. <tr>
  398. <td> {{ $ac_criterion->name }}</td>
  399. <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity->id) }}
  400. </td>
  401. <td>
  402. {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity->id) }}
  403. </td>
  404. <?php
  405. $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity->id);
  406. $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity->id);
  407. $percentage = 'N/A';
  408. $activity->getOutcomeReport();
  409. ?>
  410. @if ($out_att == 0)
  411. <td class="col-md-1 danger">{{ $percentage }}</td>
  412. @else
  413. <?php
  414. $percentage = round(($out_ach / $out_att) * 100, 2);
  415. ?>
  416. @if ($percentage >= $activity->rubric[0]->expected_percentage)
  417. <td class="col-md-1 success">{{ $percentage }}%
  418. </td>
  419. @else
  420. <td class="col-md-1 danger">{{ $percentage }}%
  421. </td>
  422. @endif
  423. @endif
  424. <td>
  425. @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
  426. <?php echo $outcome->name . "\n\n\n <br>"; ?>
  427. @endforeach
  428. </td>
  429. </tr>
  430. @endforeach
  431. </tbody>
  432. </table>
  433. <br>
  434. <h5 style="display: inline; margin:30px;">Formative Actions: </h5>
  435. <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
  436. @if ($formative_actions)
  437. <p style="display: inline;">
  438. <u>{{ $formative_actions[0]->at_text }}:
  439. </u>
  440. <i>{{ $formative_actions[0]->description }}
  441. </i>
  442. </p>
  443. <br>
  444. <h5 style="display: inline; margin:30px;">Formative Action's Associated
  445. Criteria: </h5>
  446. <ul style="margin:30px;">
  447. @foreach ($formative_actions as $criteria)
  448. <li> <i>{{ $criteria->name }} </i></li>
  449. @endforeach
  450. </ul>
  451. @endif
  452. <h5 style="display: inline; margin:30px;">Assessment Comments: </h5>
  453. @if ($activity->assessment_comments != null)
  454. <p style="display: inline;">{{ $activity->assessment_comments }}</p>
  455. @endif
  456. <br>
  457. <hr>
  458. <br>
  459. <h4>Performance of Students by Learning Outcome</h4>
  460. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
  461. <p style="display: inline;">{{ $activity->name }}
  462. <strong>({{ $activity->date }})</strong>
  463. </p>
  464. <br>
  465. <br>
  466. <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
  467. <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
  468. </p>
  469. <br>
  470. <h5 style="display: inline; margin:30px;">Expected percent of students
  471. achieving
  472. the
  473. target by learning outcome: </h5>
  474. <p style="display: inline;"> <i>
  475. <?php
  476. $expected = DB::table('target_outcomes_program')
  477. ->where('program_id', $course->program_id)
  478. ->where('semester_id', $course->semester_id)
  479. ->first(); //->expected_target;
  480. if (!$expected) {
  481. $expected = 'It has not been defined in the annual plan';
  482. } else {
  483. $expected = $expected->expected_target;
  484. }
  485. ?>
  486. {{ $expected }}
  487. </i>
  488. </p>
  489. <br>
  490. <table class='table table-striped table-condensed datatable'>
  491. <thead>
  492. <tr>
  493. <th>
  494. Learning Outcome
  495. </th>
  496. <th>
  497. Number of Students Assessed
  498. </th>
  499. <th>
  500. Number of students that achieved the target
  501. </th>
  502. <th>
  503. %
  504. </th>
  505. </tr>
  506. </thead>
  507. <tbody>
  508. @foreach ($activity->getOutcomeReport() as $outcome)
  509. <tr>
  510. <td>
  511. {{ $outcome->name }}
  512. </td>
  513. <td>
  514. {{ $outcome->attempted }}
  515. </td>
  516. <td>
  517. {{ $outcome->achieved }}
  518. </td>
  519. @if ($outcome->percentage >= $expected)
  520. <td class="col-md-1 success">
  521. {{ $outcome->percentage }}%
  522. </td>
  523. @else
  524. <td class="col-md-1 danger">
  525. {{ $outcome->percentage }}%
  526. </td>
  527. @endif
  528. </tr>
  529. @endforeach
  530. </tbody>
  531. </table>
  532. <br>
  533. <hr>
  534. @endforeach
  535. @endforeach
  536. </div>
  537. @endforeach
  538. </div>
  539. </div>
  540. @endforeach
  541. @else
  542. <h4>This program has not assessed any activity</h4>
  543. @endif
  544. @endforeach
  545. </div>
  546. </div>
  547. <script>
  548. var outcome = $('.outcome');
  549. var str = '';
  550. str += '<li><a href="#' + 1 + '">' + "outcome.text()" + '</a><ol class="schools upper-alpha">';
  551. $('[id^=' + outcome.attr('id') + '-].school:visible').each(function(e) {
  552. var school = $(this);
  553. str += '<li><a href="#' + school.attr('id') + '">' + school.text() + '</a><ol class="programs">';
  554. $('[id^=' + school.attr('id') + '-].program:visible').each(function(e) {
  555. var program = $(this);
  556. if (!program.hasClass('no-courses'))
  557. str += '<li><a href="#' + program.attr('id') + '">' + program.text() + '</a></li>';
  558. else
  559. str += '<li>' + program.text() + '</li>';
  560. });
  561. str += '</ol></li>';
  562. });
  563. // Hide accordion panel contents by default
  564. $('.panel-body').hide();
  565. // --------------------------------------------------------------------------
  566. // Functions
  567. // --------------------------------------------------------------------------
  568. // --------------------------------------------------------------------------
  569. // Events
  570. // --------------------------------------------------------------------------
  571. // When panel heading is clicked, toggle it
  572. $('.panel-heading').on('click', function() {
  573. $(this).next().stop().slideToggle();
  574. })
  575. </script>
  576. @section('included-js')
  577. @include('global._datatables_js')
  578. @stop
  579. @stop
  580. @section('javascript')
  581. // Build table of contents
  582. @stop