No Description

new_assessment_report.blade.php 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  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. <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. 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. {{ $index6 + 1 }}. <?php echo $outcome->name . "\n\n\n <br>"; ?>
  193. @endforeach
  194. </td>
  195. </tr>
  196. @endforeach
  197. </tbody>
  198. </table>
  199. <hr>
  200. <br>
  201. <h4>Perfomance by Learning Outcome Student</h4>
  202. <h5 style="display: inline; margin:30px;">Target by outcome: </h5>
  203. <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
  204. </p>
  205. <br>
  206. <h5 style="display: inline; margin:30px;">Expected percent of students achieving
  207. the
  208. target by outcome: </h5>
  209. <p style="display: inline;"> <i>
  210. <?php
  211. $expected = DB::table('target_outcomes_program')
  212. ->where('program_id', $course->program_id)
  213. ->where('semester_id', $course->semester_id)
  214. ->first();//->expected_target;
  215. if(!$expected){
  216. $expected = "It has not been defined in the annual plan";
  217. }
  218. ?>
  219. {{ $expected }}
  220. </i>
  221. </p>
  222. <br>
  223. <table class='table table-striped table-condensed datatable'>
  224. <thead>
  225. <tr>
  226. <th>
  227. Outcome
  228. </th>
  229. <th>
  230. Number of Students Assessed
  231. </th>
  232. <th>
  233. Number of students that achieved the target
  234. </th>
  235. <th>
  236. %
  237. </th>
  238. </tr>
  239. </thead>
  240. <tbody>
  241. @foreach ($activity->getOutcomeReport() as $outcome)
  242. <tr>
  243. <td>
  244. {{ $outcome->name }}
  245. </td>
  246. <td>
  247. {{ $outcome->attempted }}
  248. </td>
  249. <td>
  250. {{ $outcome->achieved }}
  251. </td>
  252. @if ($outcome->percentage >= $expected)
  253. <td class="col-md-1 success">{{ $outcome->percentage }}%
  254. </td>
  255. @else
  256. <td class="col-md-1 danger">{{ $outcome->percentage }}%
  257. </td>
  258. @endif
  259. </tr>
  260. @endforeach
  261. </tbody>
  262. </table>
  263. <br>
  264. <hr>
  265. @endforeach
  266. @endforeach
  267. @endforeach
  268. </div>
  269. </div>
  270. @endforeach
  271. @else
  272. <h4>This program has not assessed any activity</h4>
  273. @endif
  274. @endforeach
  275. </div>
  276. </div>
  277. <script>
  278. var outcome = $('.outcome');
  279. var str = '';
  280. str += '<li><a href="#' + 1 + '">' + "outcome.text()" + '</a><ol class="schools upper-alpha">';
  281. $('[id^=' + outcome.attr('id') + '-].school:visible').each(function(e) {
  282. var school = $(this);
  283. str += '<li><a href="#' + school.attr('id') + '">' + school.text() + '</a><ol class="programs">';
  284. $('[id^=' + school.attr('id') + '-].program:visible').each(function(e) {
  285. var program = $(this);
  286. if (!program.hasClass('no-courses'))
  287. str += '<li><a href="#' + program.attr('id') + '">' + program.text() + '</a></li>';
  288. else
  289. str += '<li>' + program.text() + '</li>';
  290. });
  291. str += '</ol></li>';
  292. });
  293. // Hide accordion panel contents by default
  294. $('.panel-body').hide();
  295. // --------------------------------------------------------------------------
  296. // Functions
  297. // --------------------------------------------------------------------------
  298. // --------------------------------------------------------------------------
  299. // Events
  300. // --------------------------------------------------------------------------
  301. // When panel heading is clicked, toggle it
  302. $('.panel-heading').on('click', function() {
  303. $(this).next().stop().slideToggle();
  304. })
  305. </script>
  306. @section('included-js')
  307. @include('global._datatables_js')
  308. @stop
  309. @stop
  310. @section('javascript')
  311. // Build table of contents
  312. @stop