Нема описа

new_assessment_report.blade.php 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  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. @if (!$school->programs->isEmpty())
  22. <h3>Table of Contents</h3>
  23. <ol id="table-of-contents" class="upper-roman">
  24. </ol>
  25. @foreach ($school->programs as $program)
  26. {{-- <ul id='levelTabs' class="nav nav-tabs" role="tablist">
  27. <!-- For each grouped course -->
  28. @foreach ($program->courses as $index2 => $course)
  29. <li role="presentation">
  30. <a data-toggle="tab" href="#{{ $course->code }}-{{ $course->number }}"
  31. role="tab">{{ $course->code }}-{{ $course->number }}</a>
  32. </li>
  33. @endforeach
  34. </ul>
  35. <d id="allLists" class="tab-content"> --}}
  36. <div class="panel panel-default">
  37. <div class="panel-heading">
  38. <h3 class="panel-title">{{ $program->name }}</h3>
  39. </div>
  40. <div class="panel-body">
  41. <!-- If grouped course has activities that evaluate the outcome -->
  42. @foreach ($program->courses as $index2 => $course)
  43. <?php
  44. /*$sections_evaluating = Course::has('activities')
  45. ->whereNotNull('outcomes_attempted')
  46. ->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
  47. ->with(array('activities'=>function($query) use(&$outcome){
  48. $query->whereNotNull('outcomes_attempted');
  49. $query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');} ))
  50. ->where('code', $course->code)->where('number',$course->number)
  51. ->whereIn('semester_id', Session::get('semesters_ids'))
  52. ->get();*/
  53. $sections_evaluating = Course::has('activities')
  54. //->whereNotNull('outcomes_attempted')
  55. //->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
  56. ->with([
  57. 'activities' => function ($query) use (&$course) {
  58. $activities = DB::table('activities')
  59. ->join('activity_criterion', 'activity_criterion.activity_id', '=', 'activities.id')
  60. ->join('assessments', 'assessments.activity_criterion_id', '=', 'activity_criterion.id')
  61. //->join('criterion_objective_outcome', 'activity_criterion.criterion_id', '=', 'criterion_objective_outcome.criterion_id')
  62. ->join('courses', 'courses.id', '=', 'activities.course_id')
  63. ->where('courses.code', $course->code)
  64. ->where('courses.number', $course->number)
  65. ->where('activities.draft', 0)
  66. ->where('activities.diagnostic', 0)
  67. //->where('criterion_objective_outcome.outcome_id', $outcome->id)
  68. ->select('activity_id')
  69. ->lists('activity_id');
  70. //$query->whereNotNull('outcomes_attempted');
  71. //$query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');
  72. $query->whereIn('id', $activities);
  73. },
  74. ])
  75. ->where('code', $course->code)
  76. ->where('number', $course->number)
  77. ->whereIn('semester_id', Session::get('semesters_ids'))
  78. ->orderBy('semester_id')
  79. ->get();
  80. ?>
  81. @foreach ($sections_evaluating as $index3 => $section)
  82. @if (!$section->publishedActivities->isEmpty())
  83. <h3 style="text-align: center"> Course: {{ $course->code }}
  84. {{ $course->number }}-{{ $section->section }} </h3>
  85. @endif
  86. @foreach ($section->publishedActivities as $index4 => $activity)
  87. <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
  88. <p style="display: inline;">{{ $activity->name }}
  89. <strong>({{ $activity->date }})</strong>
  90. </p>
  91. <br>
  92. <br>
  93. <h5 style="display: inline;">Performance Indicators: </h5>
  94. <?php
  95. Log::info($activity->rubric[0]);
  96. ?>
  97. <p style="display: inline;"><i>{{ $activity->rubric[0]->num_scales }} (
  98. <?php
  99. $titles = $activity->rubric[0]->getTitles();
  100. ?>
  101. @if (sizeof($titles) != 1)
  102. @foreach ($titles as $index5 => $rubric_title)
  103. @if ($index5 != $activity->rubric[0]->num_scales - 1)
  104. {{ $rubric_title->text }},
  105. @else
  106. and {{ $rubric_title->text }}
  107. @endif
  108. @endforeach
  109. )
  110. @else
  111. {{ $titles[0]->text }} )
  112. @endif
  113. </i></p>
  114. <br>
  115. <h5 style="display: inline;">Scale: </h5>
  116. @if ($activity->rubric[0]->max_score == 1)
  117. <p style="display: inline;">1 point scale</p>
  118. @else
  119. <p style="display: inline;">1-{{ $activity->rubric[0]->max_score }} point
  120. scale
  121. </p>
  122. @endif
  123. <br>
  124. <br>
  125. <h4>Perfomance by Learning Outcome Criteria</h4>
  126. <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
  127. <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_points }} or
  128. more</i>
  129. </p>
  130. <br>
  131. <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
  132. target by criterion: </h5>
  133. <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_percentage }}
  134. %</i>
  135. </p>
  136. <br>
  137. <table class='table table-striped table-condensed datatable'>
  138. <thead>
  139. <tr>
  140. <th>
  141. Criterion
  142. </th>
  143. <th>
  144. Number of Students Assessed
  145. </th>
  146. <th>
  147. Number of students that achieved the target
  148. </th>
  149. <th>
  150. %
  151. </th>
  152. <th>
  153. Outcomes
  154. </th>
  155. </tr>
  156. </thead>
  157. <tbody>
  158. @foreach ($activity->allActivityCriterionInfo() as $index5 => $ac_criterion)
  159. <tr>
  160. <td> {{ $ac_criterion->name }}</td>
  161. <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity->id) }}
  162. </td>
  163. <td>
  164. {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity->id) }}
  165. </td>
  166. <?php
  167. $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity->id);
  168. $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity->id);
  169. $percentage = 'N/A';
  170. $activity->getOutcomeReport();
  171. ?>
  172. @if ($out_att == 0)
  173. <td class="col-md-1 danger">{{ $percentage }}</td>
  174. @else
  175. <?php
  176. $percentage = round(($out_ach / $out_att) * 100, 2);
  177. ?>
  178. @if ($percentage >= $activity->rubric[0]->expected_percentage)
  179. <td class="col-md-1 success">{{ $percentage }}%</td>
  180. @else
  181. <td class="col-md-1 danger">{{ $percentage }}%</td>
  182. @endif
  183. @endif
  184. <td>
  185. @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
  186. {{ $index6 + 1 }}. <?php echo $outcome->name . "\n\n\n <br>"; ?>
  187. @endforeach
  188. </td>
  189. </tr>
  190. @endforeach
  191. </tbody>
  192. </table>
  193. <hr>
  194. <br>
  195. <h4>Perfomance by Learning Outcome Student</h4>
  196. <h5 style="display: inline; margin:30px;">Target by outcome: </h5>
  197. <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
  198. </p>
  199. <br>
  200. <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
  201. target by outcome: </h5>
  202. <p style="display: inline;"> <i>
  203. <?php
  204. $expected = DB::table('target_outcomes_program')
  205. ->where('program_id', $course->program_id)
  206. ->where('semester_id', $course->semester_id)
  207. ->first()->expected_target;
  208. ?>
  209. {{ $expected }}
  210. </i>
  211. </p>
  212. <br>
  213. <table class='table table-striped table-condensed datatable'>
  214. <thead>
  215. <tr>
  216. <th>
  217. Outcome
  218. </th>
  219. <th>
  220. Number of Students Assessed
  221. </th>
  222. <th>
  223. Number of students that achieved the target
  224. </th>
  225. <th>
  226. %
  227. </th>
  228. </tr>
  229. </thead>
  230. <tbody>
  231. @foreach ($activity->getOutcomeReport() as $outcome)
  232. <tr>
  233. <td>
  234. {{ $outcome->name }}
  235. </td>
  236. <td>
  237. {{ $outcome->attempted }}
  238. </td>
  239. <td>
  240. {{ $outcome->achieved }}
  241. </td>
  242. @if ($outcome->percentage >= $expected)
  243. <td class="col-md-1 success">{{ $outcome->percentage }}%</td>
  244. @else
  245. <td class="col-md-1 danger">{{ $outcome->percentage }}%</td>
  246. @endif
  247. </tr>
  248. @endforeach
  249. </tbody>
  250. </table>
  251. <br>
  252. <hr>
  253. @endforeach
  254. @endforeach
  255. @endforeach
  256. </div>
  257. </div>
  258. @endforeach
  259. @else
  260. <h4>This program has not assessed any activity</h4>
  261. @endif
  262. </div>
  263. </div>
  264. <script>
  265. var outcome = $('.outcome');
  266. var str = '';
  267. str += '<li><a href="#' + 1 + '">' + "outcome.text()" + '</a><ol class="schools upper-alpha">';
  268. $('[id^=' + outcome.attr('id') + '-].school:visible').each(function(e) {
  269. var school = $(this);
  270. str += '<li><a href="#' + school.attr('id') + '">' + school.text() + '</a><ol class="programs">';
  271. $('[id^=' + school.attr('id') + '-].program:visible').each(function(e) {
  272. var program = $(this);
  273. if (!program.hasClass('no-courses'))
  274. str += '<li><a href="#' + program.attr('id') + '">' + program.text() + '</a></li>';
  275. else
  276. str += '<li>' + program.text() + '</li>';
  277. });
  278. str += '</ol></li>';
  279. });
  280. // Hide accordion panel contents by default
  281. $('.panel-body').hide();
  282. // --------------------------------------------------------------------------
  283. // Functions
  284. // --------------------------------------------------------------------------
  285. // --------------------------------------------------------------------------
  286. // Events
  287. // --------------------------------------------------------------------------
  288. // When panel heading is clicked, toggle it
  289. $('.panel-heading').on('click', function() {
  290. $(this).next().stop().slideToggle();
  291. })
  292. </script>
  293. @section('included-js')
  294. @include('global._datatables_js')
  295. @stop
  296. @stop
  297. @section('javascript')
  298. // Build table of contents
  299. @stop