No Description

new_assessment_report.blade.php 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  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>Perfomance 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. <h5 style="display: inline; margin:30px;">Formative Actions: </h5>
  144. <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
  145. @if ($formative_actions)
  146. <p style="display: inline;">
  147. <strong>{{ $formative_actions[0]->at_text }}:
  148. </strong>
  149. <i>{{ $formative_actions[0]->description }}
  150. </i>
  151. </p>
  152. <br>
  153. <h5>Formative Action's Associated
  154. Criteria: </h5>
  155. <ul>
  156. @foreach ($formative_actions as $criteria)
  157. <li> <i>{{ $criteria->name }} <i></li>
  158. @endforeach
  159. </ul>
  160. @else
  161. <p style="display: inline;"> <strong>Has no Formative Action yet </strong>
  162. @endif
  163. <br>
  164. <table class='table table-striped table-condensed datatable'>
  165. <thead>
  166. <tr>
  167. <th>
  168. Criterion
  169. </th>
  170. <th>
  171. Number of Students Assessed
  172. </th>
  173. <th>
  174. Number of students that achieved the target
  175. </th>
  176. <th>
  177. %
  178. </th>
  179. <th>
  180. Outcomes
  181. </th>
  182. </tr>
  183. </thead>
  184. <tbody>
  185. @foreach ($activity->allActivityCriterionInfo() as $index5 => $ac_criterion)
  186. <tr>
  187. <td> {{ $ac_criterion->name }}</td>
  188. <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity->id) }}
  189. </td>
  190. <td>
  191. {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity->id) }}
  192. </td>
  193. <?php
  194. $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity->id);
  195. $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity->id);
  196. $percentage = 'N/A';
  197. $activity->getOutcomeReport();
  198. ?>
  199. @if ($out_att == 0)
  200. <td class="col-md-1 danger">{{ $percentage }}</td>
  201. @else
  202. <?php
  203. $percentage = round(($out_ach / $out_att) * 100, 2);
  204. ?>
  205. @if ($percentage >= $activity->rubric[0]->expected_percentage)
  206. <td class="col-md-1 success">{{ $percentage }}%</td>
  207. @else
  208. <td class="col-md-1 danger">{{ $percentage }}%</td>
  209. @endif
  210. @endif
  211. <td>
  212. @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
  213. {{ $index6 + 1 }}. <?php echo $outcome->name . "\n\n\n <br>"; ?>
  214. @endforeach
  215. </td>
  216. </tr>
  217. @endforeach
  218. </tbody>
  219. </table>
  220. <hr>
  221. <br>
  222. <h4>Perfomance by Learning Outcome Student</h4>
  223. <h5 style="display: inline; margin:30px;">Target by outcome: </h5>
  224. <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
  225. </p>
  226. <br>
  227. <h5 style="display: inline; margin:30px;">Expected percent of students achieving
  228. the
  229. target by outcome: </h5>
  230. <p style="display: inline;"> <i>
  231. <?php
  232. $expected = DB::table('target_outcomes_program')
  233. ->where('program_id', $course->program_id)
  234. ->where('semester_id', $course->semester_id)
  235. ->first(); //->expected_target;
  236. if (!$expected) {
  237. $expected = 'It has not been defined in the annual plan';
  238. }
  239. ?>
  240. {{ $expected }}
  241. </i>
  242. </p>
  243. <br>
  244. <table class='table table-striped table-condensed datatable'>
  245. <thead>
  246. <tr>
  247. <th>
  248. Outcome
  249. </th>
  250. <th>
  251. Number of Students Assessed
  252. </th>
  253. <th>
  254. Number of students that achieved the target
  255. </th>
  256. <th>
  257. %
  258. </th>
  259. </tr>
  260. </thead>
  261. <tbody>
  262. @foreach ($activity->getOutcomeReport() as $outcome)
  263. <tr>
  264. <td>
  265. {{ $outcome->name }}
  266. </td>
  267. <td>
  268. {{ $outcome->attempted }}
  269. </td>
  270. <td>
  271. {{ $outcome->achieved }}
  272. </td>
  273. @if ($outcome->percentage >= $expected)
  274. <td class="col-md-1 success">{{ $outcome->percentage }}%
  275. </td>
  276. @else
  277. <td class="col-md-1 danger">{{ $outcome->percentage }}%
  278. </td>
  279. @endif
  280. </tr>
  281. @endforeach
  282. </tbody>
  283. </table>
  284. <br>
  285. <hr>
  286. @endforeach
  287. @endforeach
  288. @endforeach
  289. </div>
  290. </div>
  291. @endforeach
  292. @else
  293. <h4>This program has not assessed any activity</h4>
  294. @endif
  295. @endforeach
  296. </div>
  297. </div>
  298. <script>
  299. var outcome = $('.outcome');
  300. var str = '';
  301. str += '<li><a href="#' + 1 + '">' + "outcome.text()" + '</a><ol class="schools upper-alpha">';
  302. $('[id^=' + outcome.attr('id') + '-].school:visible').each(function(e) {
  303. var school = $(this);
  304. str += '<li><a href="#' + school.attr('id') + '">' + school.text() + '</a><ol class="programs">';
  305. $('[id^=' + school.attr('id') + '-].program:visible').each(function(e) {
  306. var program = $(this);
  307. if (!program.hasClass('no-courses'))
  308. str += '<li><a href="#' + program.attr('id') + '">' + program.text() + '</a></li>';
  309. else
  310. str += '<li>' + program.text() + '</li>';
  311. });
  312. str += '</ol></li>';
  313. });
  314. // Hide accordion panel contents by default
  315. $('.panel-body').hide();
  316. // --------------------------------------------------------------------------
  317. // Functions
  318. // --------------------------------------------------------------------------
  319. // --------------------------------------------------------------------------
  320. // Events
  321. // --------------------------------------------------------------------------
  322. // When panel heading is clicked, toggle it
  323. $('.panel-heading').on('click', function() {
  324. $(this).next().stop().slideToggle();
  325. })
  326. </script>
  327. @section('included-js')
  328. @include('global._datatables_js')
  329. @stop
  330. @stop
  331. @section('javascript')
  332. // Build table of contents
  333. @stop