No Description

new_assessment_report.blade.php 49KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  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. <!-- If grouped course has activities that evaluate the outcome -->
  46. @foreach ($program->courses as $index2 => $course)
  47. <?php
  48. /*$sections_evaluating = Course::has('activities')
  49. ->whereNotNull('outcomes_attempted')
  50. ->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
  51. ->with(array('activities'=>function($query) use(&$outcome){
  52. $query->whereNotNull('outcomes_attempted');
  53. $query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');} ))
  54. ->where('code', $course->code)->where('number',$course->number)
  55. ->whereIn('semester_id', Session::get('semesters_ids'))
  56. ->get();*/
  57. $sections_evaluating = Course::has('activities')
  58. //->whereNotNull('outcomes_attempted')
  59. //->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
  60. ->with([
  61. 'activities' => function ($query) use (&$course) {
  62. $activities = DB::table('activities')
  63. ->join('activity_criterion', 'activity_criterion.activity_id', '=', 'activities.id')
  64. ->join('assessments', 'assessments.activity_criterion_id', '=', 'activity_criterion.id')
  65. //->join('criterion_objective_outcome', 'activity_criterion.criterion_id', '=', 'criterion_objective_outcome.criterion_id')
  66. ->join('courses', 'courses.id', '=', 'activities.course_id')
  67. ->where('courses.code', $course->code)
  68. ->where('courses.number', $course->number)
  69. ->where('activities.draft', 0)
  70. ->where('activities.diagnostic', 0)
  71. //->where('criterion_objective_outcome.outcome_id', $outcome->id)
  72. ->select('activity_id')
  73. ->lists('activity_id');
  74. //$query->whereNotNull('outcomes_attempted');
  75. //$query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');
  76. $query->whereIn('id', $activities);
  77. },
  78. ])
  79. ->where('code', $course->code)
  80. ->where('number', $course->number)
  81. ->whereIn('semester_id', Session::get('semesters_ids'))
  82. ->orderBy('semester_id')
  83. ->get();
  84. ?>
  85. @foreach ($sections_evaluating as $index3 => $section)
  86. @if (!$section->publishedActivities->isEmpty())
  87. <h3 style="text-align: center"> Course: {{ $course->code }}
  88. {{ $course->number }}-{{ $section->section }} </h3>
  89. @endif
  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. <br>
  234. <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
  235. <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
  236. </p>
  237. <br>
  238. <h5 style="display: inline; margin:30px;">Expected percent of students
  239. achieving
  240. the
  241. target by learning outcome: </h5>
  242. <p style="display: inline;"> <i>
  243. <?php
  244. $expected = DB::table('target_outcomes_program')
  245. ->where('program_id', $course->program_id)
  246. ->where('semester_id', $course->semester_id)
  247. ->first(); //->expected_target;
  248. if (!$expected) {
  249. $expected = 'It has not been defined in the annual plan';
  250. } else {
  251. $expected = $expected->expected_target;
  252. }
  253. ?>
  254. {{ $expected }}
  255. </i>
  256. </p>
  257. <br>
  258. <table class='table table-striped table-condensed datatable'>
  259. <thead>
  260. <tr>
  261. <th>
  262. Learning Outcome
  263. </th>
  264. <th>
  265. Number of Students Assessed
  266. </th>
  267. <th>
  268. Number of students that achieved the target
  269. </th>
  270. <th>
  271. %
  272. </th>
  273. </tr>
  274. </thead>
  275. <tbody>
  276. @foreach ($activity->getOutcomeReport() as $outcome)
  277. <tr>
  278. <td>
  279. {{ $outcome->name }}
  280. </td>
  281. <td>
  282. {{ $outcome->attempted }}
  283. </td>
  284. <td>
  285. {{ $outcome->achieved }}
  286. </td>
  287. @if ($outcome->percentage >= $expected)
  288. <td class="col-md-1 success">
  289. {{ $outcome->percentage }}%
  290. </td>
  291. @else
  292. <td class="col-md-1 danger">
  293. {{ $outcome->percentage }}%
  294. </td>
  295. @endif
  296. </tr>
  297. @endforeach
  298. </tbody>
  299. </table>
  300. <br>
  301. <hr>
  302. @endforeach
  303. <h4>Diagnostic Activities</h4>
  304. @foreach ($section->diagnosticActivities as $index4 => $activity)
  305. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
  306. <p style="display: inline;">{{ $activity->name }}
  307. <strong>({{ $activity->date }})</strong>
  308. </p>
  309. <br>
  310. <br>
  311. <h5 style="display: inline;">Performance Indicators: </h5>
  312. <?php
  313. Log::info($activity->rubric[0]);
  314. ?>
  315. <p style="display: inline;"><i>{{ $activity->rubric[0]->num_scales }} (
  316. <?php
  317. $titles = $activity->rubric[0]->getTitles();
  318. ?>
  319. @if (sizeof($titles) != 1)
  320. @foreach ($titles as $index5 => $rubric_title)
  321. @if ($index5 != $activity->rubric[0]->num_scales - 1)
  322. {{ $rubric_title->text }},
  323. @else
  324. and {{ $rubric_title->text }}
  325. @endif
  326. @endforeach
  327. )
  328. @else
  329. {{ $titles[0]->text }} )
  330. @endif
  331. </i></p>
  332. <br>
  333. <h5 style="display: inline;">Scale: </h5>
  334. @if ($activity->rubric[0]->max_score == 1)
  335. <p style="display: inline;">1 point scale</p>
  336. @else
  337. <p style="display: inline;">1-{{ $activity->rubric[0]->max_score }} point
  338. scale
  339. </p>
  340. @endif
  341. <br>
  342. <br>
  343. <h4>Performance of Students by Learning Outcome Criteria</h4>
  344. <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
  345. <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_points }}
  346. or
  347. more</i>
  348. </p>
  349. <br>
  350. <h5 style="display: inline; margin:30px;">Expected percent of students achieving
  351. the
  352. target by criterion: </h5>
  353. <p style="display: inline;">
  354. <i>{{ $activity->rubric[0]->expected_percentage }}
  355. %</i>
  356. </p>
  357. <br>
  358. <table class='table table-striped table-condensed datatable'>
  359. <thead>
  360. <tr>
  361. <th>
  362. Criterion
  363. </th>
  364. <th>
  365. Number of Students Assessed
  366. </th>
  367. <th>
  368. Number of students that achieved the target
  369. </th>
  370. <th>
  371. %
  372. </th>
  373. <th>
  374. Learning Outcomes
  375. </th>
  376. </tr>
  377. </thead>
  378. <tbody>
  379. @foreach ($activity->allActivityCriterionInfo() as $index5 => $ac_criterion)
  380. <tr>
  381. <td> {{ $ac_criterion->name }}</td>
  382. <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity->id) }}
  383. </td>
  384. <td>
  385. {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity->id) }}
  386. </td>
  387. <?php
  388. $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity->id);
  389. $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity->id);
  390. $percentage = 'N/A';
  391. $activity->getOutcomeReport();
  392. ?>
  393. @if ($out_att == 0)
  394. <td class="col-md-1 danger">{{ $percentage }}</td>
  395. @else
  396. <?php
  397. $percentage = round(($out_ach / $out_att) * 100, 2);
  398. ?>
  399. @if ($percentage >= $activity->rubric[0]->expected_percentage)
  400. <td class="col-md-1 success">{{ $percentage }}%</td>
  401. @else
  402. <td class="col-md-1 danger">{{ $percentage }}%</td>
  403. @endif
  404. @endif
  405. <td>
  406. @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
  407. <?php echo $outcome->name . "\n\n\n <br>"; ?>
  408. @endforeach
  409. </td>
  410. </tr>
  411. @endforeach
  412. </tbody>
  413. </table>
  414. <br>
  415. <h5 style="display: inline; margin:30px;">Formative Actions: </h5>
  416. <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
  417. @if ($formative_actions)
  418. <p style="display: inline;">
  419. <u>{{ $formative_actions[0]->at_text }}:
  420. </u>
  421. <i>{{ $formative_actions[0]->description }}
  422. </i>
  423. </p>
  424. <br>
  425. <h5 style="display: inline; margin:30px;">Formative Action's Associated
  426. Criteria: </h5>
  427. <ul style="margin:30px;">
  428. @foreach ($formative_actions as $criteria)
  429. <li> <i>{{ $criteria->name }} <i></li>
  430. @endforeach
  431. </ul>
  432. @endif
  433. <br>
  434. <h5 style="display: inline; margin:30px;">Assessment Comments: </h5>
  435. @if ($activity->assessment_comments != null)
  436. <p style="display: inline;">{{ $activity->assessment_comments }}</p>
  437. @endif
  438. <br>
  439. <hr>
  440. <br>
  441. <h4>Performance of Students by Learning Outcome</h4>
  442. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
  443. <p style="display: inline;">{{ $activity->name }}
  444. <strong>({{ $activity->date }})</strong>
  445. </p>
  446. <br>
  447. <br>
  448. <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
  449. <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
  450. </p>
  451. <br>
  452. <h5 style="display: inline; margin:30px;">Expected percent of students
  453. achieving
  454. the
  455. target by learning outcome: </h5>
  456. <p style="display: inline;"> <i>
  457. <?php
  458. $expected = DB::table('target_outcomes_program')
  459. ->where('program_id', $course->program_id)
  460. ->where('semester_id', $course->semester_id)
  461. ->first(); //->expected_target;
  462. if (!$expected) {
  463. $expected = 'It has not been defined in the annual plan';
  464. } else {
  465. $expected = $expected->expected_target;
  466. }
  467. ?>
  468. {{ $expected }}
  469. </i>
  470. </p>
  471. <br>
  472. <table class='table table-striped table-condensed datatable'>
  473. <thead>
  474. <tr>
  475. <th>
  476. Learning Outcome
  477. </th>
  478. <th>
  479. Number of Students Assessed
  480. </th>
  481. <th>
  482. Number of students that achieved the target
  483. </th>
  484. <th>
  485. %
  486. </th>
  487. </tr>
  488. </thead>
  489. <tbody>
  490. @foreach ($activity->getOutcomeReport() as $outcome)
  491. <tr>
  492. <td>
  493. {{ $outcome->name }}
  494. </td>
  495. <td>
  496. {{ $outcome->attempted }}
  497. </td>
  498. <td>
  499. {{ $outcome->achieved }}
  500. </td>
  501. @if ($outcome->percentage >= $expected)
  502. <td class="col-md-1 success">
  503. {{ $outcome->percentage }}%
  504. </td>
  505. @else
  506. <td class="col-md-1 danger">
  507. {{ $outcome->percentage }}%
  508. </td>
  509. @endif
  510. </tr>
  511. @endforeach
  512. </tbody>
  513. </table>
  514. <br>
  515. <hr>
  516. @endforeach
  517. @endforeach
  518. @endforeach
  519. </div>
  520. </div>
  521. @endforeach
  522. @else
  523. <h4>This program has not assessed any activity</h4>
  524. @endif
  525. @endforeach
  526. </div>
  527. </div>
  528. <script>
  529. var outcome = $('.outcome');
  530. var str = '';
  531. str += '<li><a href="#' + 1 + '">' + "outcome.text()" + '</a><ol class="schools upper-alpha">';
  532. $('[id^=' + outcome.attr('id') + '-].school:visible').each(function(e) {
  533. var school = $(this);
  534. str += '<li><a href="#' + school.attr('id') + '">' + school.text() + '</a><ol class="programs">';
  535. $('[id^=' + school.attr('id') + '-].program:visible').each(function(e) {
  536. var program = $(this);
  537. if (!program.hasClass('no-courses'))
  538. str += '<li><a href="#' + program.attr('id') + '">' + program.text() + '</a></li>';
  539. else
  540. str += '<li>' + program.text() + '</li>';
  541. });
  542. str += '</ol></li>';
  543. });
  544. // Hide accordion panel contents by default
  545. $('.panel-body').hide();
  546. // --------------------------------------------------------------------------
  547. // Functions
  548. // --------------------------------------------------------------------------
  549. // --------------------------------------------------------------------------
  550. // Events
  551. // --------------------------------------------------------------------------
  552. // When panel heading is clicked, toggle it
  553. $('.panel-heading').on('click', function() {
  554. $(this).next().stop().slideToggle();
  555. })
  556. </script>
  557. @section('included-js')
  558. @include('global._datatables_js')
  559. @stop
  560. @stop
  561. @section('javascript')
  562. // Build table of contents
  563. @stop