暂无描述

new_assessment_report.blade.php 34KB

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