No Description

new_assessment_report.blade.php 32KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  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. @foreach ($section->publishedActivities as $index4 => $activity)
  90. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
  91. <p style="display: inline;">{{ $activity->name }}
  92. <strong>({{ $activity->date }})</strong>
  93. </p>
  94. <br>
  95. <br>
  96. <h5 style="display: inline;">Performance Indicators: </h5>
  97. <?php
  98. Log::info($activity->rubric[0]);
  99. ?>
  100. <p style="display: inline;"><i>{{ $activity->rubric[0]->num_scales }} (
  101. <?php
  102. $titles = $activity->rubric[0]->getTitles();
  103. ?>
  104. @if (sizeof($titles) != 1)
  105. @foreach ($titles as $index5 => $rubric_title)
  106. @if ($index5 != $activity->rubric[0]->num_scales - 1)
  107. {{ $rubric_title->text }},
  108. @else
  109. and {{ $rubric_title->text }}
  110. @endif
  111. @endforeach
  112. )
  113. @else
  114. {{ $titles[0]->text }} )
  115. @endif
  116. </i></p>
  117. <br>
  118. <h5 style="display: inline;">Scale: </h5>
  119. @if ($activity->rubric[0]->max_score == 1)
  120. <p style="display: inline;">1 point scale</p>
  121. @else
  122. <p style="display: inline;">1-{{ $activity->rubric[0]->max_score }} point
  123. scale
  124. </p>
  125. @endif
  126. <br>
  127. <br>
  128. <h4>Performance of Students by Learning Outcome Criteria</h4>
  129. <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
  130. <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_points }}
  131. or
  132. more</i>
  133. </p>
  134. <br>
  135. <h5 style="display: inline; margin:30px;">Expected percent of students achieving
  136. the
  137. target by criterion: </h5>
  138. <p style="display: inline;">
  139. <i>{{ $activity->rubric[0]->expected_percentage }}
  140. %</i>
  141. </p>
  142. <br>
  143. <table class='table table-striped table-condensed datatable'>
  144. <thead>
  145. <tr>
  146. <th>
  147. Criterion
  148. </th>
  149. <th>
  150. Number of Students Assessed
  151. </th>
  152. <th>
  153. Number of students that achieved the target
  154. </th>
  155. <th>
  156. %
  157. </th>
  158. <th>
  159. Learning Outcomes
  160. </th>
  161. </tr>
  162. </thead>
  163. <tbody>
  164. @foreach ($activity->allActivityCriterionInfo() as $index5 => $ac_criterion)
  165. <tr>
  166. <td> {{ $ac_criterion->name }}</td>
  167. <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity->id) }}
  168. </td>
  169. <td>
  170. {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity->id) }}
  171. </td>
  172. <?php
  173. $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity->id);
  174. $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity->id);
  175. $percentage = 'N/A';
  176. $activity->getOutcomeReport();
  177. ?>
  178. @if ($out_att == 0)
  179. <td class="col-md-1 danger">{{ $percentage }}</td>
  180. @else
  181. <?php
  182. $percentage = round(($out_ach / $out_att) * 100, 2);
  183. ?>
  184. @if ($percentage >= $activity->rubric[0]->expected_percentage)
  185. <td class="col-md-1 success">{{ $percentage }}%</td>
  186. @else
  187. <td class="col-md-1 danger">{{ $percentage }}%</td>
  188. @endif
  189. @endif
  190. <td>
  191. @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
  192. <?php echo $outcome->name . "\n\n\n <br>"; ?>
  193. @endforeach
  194. </td>
  195. </tr>
  196. @endforeach
  197. </tbody>
  198. </table>
  199. <br>
  200. <h5 style="display: inline; margin:30px;">Formative Actions: </h5>
  201. <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
  202. @if ($formative_actions)
  203. <p style="display: inline;">
  204. <u>{{ $formative_actions[0]->at_text }}:
  205. </u>
  206. <i>{{ $formative_actions[0]->description }}
  207. </i>
  208. </p>
  209. <br>
  210. <h5 style="display: inline; margin:30px;">Formative Action's Associated
  211. Criteria: </h5>
  212. <ul style="margin:30px;">
  213. @foreach ($formative_actions as $criteria)
  214. <li> <i>{{ $criteria->name }} <i></li>
  215. @endforeach
  216. </ul>
  217. @endif
  218. <br>
  219. <h5 style="display: inline; margin:30px;">Assessment Comments: </h5>
  220. @if ($activity->assessment_comments != null)
  221. <p style="display: inline;">{{ $activity->assessment_comments }}</p>
  222. @endif
  223. <br>
  224. <hr>
  225. <br>
  226. <h4>Performance of Students by Learning Outcome</h4>
  227. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
  228. <p style="display: inline;">{{ $activity->name }}
  229. <strong>({{ $activity->date }})</strong>
  230. </p>
  231. <br>
  232. <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
  233. <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
  234. </p>
  235. <br>
  236. <h5 style="display: inline; margin:30px;">Expected percent of students
  237. achieving
  238. the
  239. target by learning outcome: </h5>
  240. <p style="display: inline;"> <i>
  241. <?php
  242. $expected = DB::table('target_outcomes_program')
  243. ->where('program_id', $course->program_id)
  244. ->where('semester_id', $course->semester_id)
  245. ->first(); //->expected_target;
  246. if (!$expected) {
  247. $expected = 'It has not been defined in the annual plan';
  248. }
  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. @endforeach
  303. @endforeach
  304. </div>
  305. </div>
  306. @endforeach
  307. @else
  308. <h4>This program has not assessed any activity</h4>
  309. @endif
  310. @endforeach
  311. </div>
  312. </div>
  313. <script>
  314. var outcome = $('.outcome');
  315. var str = '';
  316. str += '<li><a href="#' + 1 + '">' + "outcome.text()" + '</a><ol class="schools upper-alpha">';
  317. $('[id^=' + outcome.attr('id') + '-].school:visible').each(function(e) {
  318. var school = $(this);
  319. str += '<li><a href="#' + school.attr('id') + '">' + school.text() + '</a><ol class="programs">';
  320. $('[id^=' + school.attr('id') + '-].program:visible').each(function(e) {
  321. var program = $(this);
  322. if (!program.hasClass('no-courses'))
  323. str += '<li><a href="#' + program.attr('id') + '">' + program.text() + '</a></li>';
  324. else
  325. str += '<li>' + program.text() + '</li>';
  326. });
  327. str += '</ol></li>';
  328. });
  329. // Hide accordion panel contents by default
  330. $('.panel-body').hide();
  331. // --------------------------------------------------------------------------
  332. // Functions
  333. // --------------------------------------------------------------------------
  334. // --------------------------------------------------------------------------
  335. // Events
  336. // --------------------------------------------------------------------------
  337. // When panel heading is clicked, toggle it
  338. $('.panel-heading').on('click', function() {
  339. $(this).next().stop().slideToggle();
  340. })
  341. </script>
  342. @section('included-js')
  343. @include('global._datatables_js')
  344. @stop
  345. @stop
  346. @section('javascript')
  347. // Build table of contents
  348. @stop