No Description

new_assessment_report.blade.php 49KB

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