Nessuna descrizione

new_assessment_report.blade.php 33KB

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