설명 없음

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