No Description

print_school_students_report.blade.php 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. @extends('layouts.print')
  2. @section('header')
  3. <p class="header-text">
  4. @foreach (Session::get('semesters_info') as $index => $semester_info)
  5. {{ $semester_info }}
  6. @if($index+1 != count(Session::get('semesters_info')))
  7. <strong>&#183;</strong>
  8. @endif
  9. @endforeach
  10. </p>
  11. <p class="header-text">Assessment Results</p>
  12. <h1 class="header-text">School of {{{ $school->name}}}</h1>
  13. @stop
  14. @section('main')
  15. <br>
  16. <div class="row">
  17. <div class="col-md-8" id="graph2"></div>
  18. </div>
  19. <div class="row">
  20. <div class="col-md-8">
  21. <h3>Performance of {{ $school->name }} Undergrad Students by Learning Outcome</h3>
  22. @if($outcomes->count()>0)
  23. <table class="table table-striped table-condensed datatable">
  24. <thead>
  25. <tr>
  26. <th>Learning Outcome</th>
  27. <th>Program</th>
  28. <th>Program Id</th>
  29. <th>Program Is Graduate</th>
  30. <th>Number Students</th>
  31. <th>Number Students that Achieved the Target</th>
  32. <th>Percentage of Students that Achieved the Target</th>
  33. <!--<th>Semesters</th>-->
  34. </tr>
  35. </thead>
  36. <tbody>
  37. @foreach($undergraduate_programs as $program)
  38. @foreach($outcomes_colap as $outcome)
  39. @if(isset($outcomes_undergrad_program_attempted_colap[$outcome->id][$program->id]))
  40. <tr>
  41. <td>{{ $outcome->name }}</td>
  42. <td>{{{ $program->name }}}</td>
  43. <td>{{{ $program->id }}}</td>
  44. <td>{{{ $program->is_graduate }}}</td>
  45. <td>{{{ $outcomes_undergrad_program_attempted_colap[$outcome->id][$program->id] }}}</td>
  46. @if(isset($outcomes_undergrad_program_achieved_colap[$outcome->id][$program->id]))
  47. <td>{{{ $outcomes_undergrad_program_achieved_colap[$outcome->id][$program->id] }}}</td>
  48. <td>
  49. @if($outcomes_undergrad_program_attempted_colap[$outcome->id][$program->id]!=0)
  50. {{{ round($outcomes_undergrad_program_achieved_colap[$outcome->id][$program->id] / $outcomes_undergrad_program_attempted_colap[$outcome->id][$program->id]*100, 2) }}}%
  51. @else
  52. N/M
  53. @endif
  54. </td>
  55. @else
  56. <td>0</td><td>0%</td>
  57. @endif
  58. {{--}}
  59. <td>
  60. @if(isset($outcomes_undergraduate_attempted_colap_semesters[$program->id][$outcome->id]))
  61. {{{ str_replace('"','',json_encode($outcomes_undergraduate_attempted_colap_semesters[$program->id][$outcome->id])) }}}
  62. @else
  63. N/M
  64. @endif
  65. </td>--}}
  66. </tr>
  67. @endif
  68. @endforeach
  69. @endforeach
  70. </tbody>
  71. </table>
  72. @else
  73. <p class="lead"> No courses assigned.</p>
  74. @endif
  75. </div>
  76. </div>
  77. <div class="row">
  78. <div class="col-md-8" id="graph3"></div>
  79. </div>
  80. <div class="row">
  81. <div class="col-md-8">
  82. <h3>Performance of {{ $school->name }} Graduate Students by Learning Outcome</h3>
  83. @if($outcomes->count()>0)
  84. <table class="table table-striped table-condensed datatable">
  85. <thead>
  86. <tr>
  87. <th>Learning Outcome</th>
  88. <th>Program</th>
  89. <th>Program Id</th>
  90. <th>Program Is Graduate</th>
  91. <th>Number Students</th>
  92. <th>Number Students that Achieved the Target</th>
  93. <th>Percentage of Students that Achieved the Target</th>
  94. </tr>
  95. </thead>
  96. <tbody>
  97. @foreach($graduate_programs as $program)
  98. @foreach($outcomes_colap as $outcome)
  99. @if(isset($outcomes_grad_program_attempted_colap[$outcome->id][$program->id]))
  100. <tr>
  101. <td>{{ $outcome->name }}</td>
  102. <td>{{{ $program->name }}}</td>
  103. <td>{{{ $program->id }}}</td>
  104. <td>{{{ $program->is_graduate }}}</td>
  105. <td>{{{ $outcomes_grad_program_attempted_colap[$outcome->id][$program->id] }}}</td>
  106. @if((isset($outcomes_grad_program_achieved_colap[$outcome->id][$program->id])))
  107. <td>{{{ $outcomes_grad_program_achieved_colap[$outcome->id][$program->id] }}}</td>
  108. <td>
  109. @if($outcomes_grad_program_attempted_colap[$outcome->id][$program->id]!=0)
  110. {{{ round($outcomes_grad_program_achieved_colap[$outcome->id][$program->id] / $outcomes_grad_program_attempted_colap[$outcome->id][$program->id]*100, 2) }}}%
  111. @else
  112. N/M
  113. @endif
  114. </td>
  115. @else
  116. <td>
  117. 0</td>
  118. <td>0%</td>
  119. @endif
  120. </tr>
  121. @endif
  122. @endforeach
  123. @endforeach
  124. </tbody>
  125. </table>
  126. @else
  127. <p class="lead"> No courses assigned.</p>
  128. @endif
  129. </div>
  130. </div>
  131. <div class="row">
  132. <div class="col-md-12">
  133. <h3>Courses in this School</h3>
  134. @if(count($grouped_courses)>0)
  135. <table class="table table-striped table-condensed datatable">
  136. <thead>
  137. <tr>
  138. <th>Identifier</th>
  139. <th>Name</th>
  140. <th>Course Program</th>
  141. <th>Number of Students</th>
  142. </tr>
  143. </thead>
  144. <tfoot>
  145. <tr class="column-search">
  146. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  147. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  148. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  149. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  150. </tr>
  151. </tfoot>
  152. <tbody>
  153. @foreach($grouped_courses as $grouped_course)
  154. <tr>
  155. <td class="col-md-2">{{ $grouped_course->code.$grouped_course->number.' ('.$grouped_course->semester->code.')' }}</td>
  156. <td class="col-md-4">{{{ $grouped_course->name}}}</td>
  157. <td class="col-md-2">{{{ $grouped_course->program->code}}}</td>
  158. <td class="col-md-3">{{{ $grouped_course->quantity }}}</td>
  159. </tr>
  160. @endforeach
  161. </tbody>
  162. </table>
  163. @else
  164. <p class="lead"> No courses assigned.</p>
  165. @endif
  166. </div>
  167. </div>
  168. @stop
  169. @section('included-js')
  170. <!-- HighCharts -->
  171. <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
  172. <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
  173. @stop
  174. @section('javascript')
  175. $(function () {
  176. $('#schoolTabs a').click(function (e) {
  177. e.preventDefault()
  178. $(this).tab('show');
  179. });
  180. $('#graph2').highcharts({
  181. chart: {
  182. type: 'bar'
  183. },
  184. title: {
  185. text: 'Performance of {{ $school->name }} Undergraduate Students by Learning Outcome'
  186. },
  187. legend: {
  188. reversed: true,
  189. },
  190. xAxis: {
  191. categories: [
  192. @foreach($outcomes_colap as $outcome)
  193. @if(isset($outcomes_undergraduate_attempted_colap_todo[$outcome->id]) &&
  194. isset($outcomes_undergraduate_achieved_colap_todo[$outcome->id]))
  195. "{{{ $outcome->name }}}<br>(N = {{{ $outcomes_undergraduate_attempted_colap_todo[$outcome->id] }}}, {{{ $outcomes_undergraduate_achieved_colap_todo[$outcome->id] }}})",
  196. @elseif(isset($outcomes_undergraduate_attempted_colap_todo[$outcome->id]))
  197. "{{{ $outcome->name }}}<br>(N = {{{ $outcomes_undergraduate_attempted_colap_todo[$outcome->id] }}}, 0)",
  198. @else
  199. "{{{ $outcome->name }}}<br>(N = 0, 0)",
  200. @endif
  201. @endforeach
  202. ],
  203. labels: {
  204. style: {
  205. fontSize:'11px'
  206. },
  207. step:1,
  208. useHTML:true,
  209. formatter: function() {
  210. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  211. },
  212. }
  213. },
  214. yAxis: {
  215. min: 0,
  216. max: 100,
  217. title: {
  218. text: 'Percentage'
  219. },
  220. plotLines:[{
  221. value:70,
  222. color: '#000',
  223. width:3,
  224. zIndex:4,
  225. label:{
  226. text: 'Goal (70%)',
  227. style: {
  228. color: '#000',
  229. fontSize: '14px',
  230. }
  231. }
  232. }]
  233. },
  234. tooltip: {
  235. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  236. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  237. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  238. footerFormat: '</table>',
  239. shared: true,
  240. useHTML: true
  241. },
  242. plotOptions: {
  243. bar: {
  244. //grouping: false,
  245. shadow: false,
  246. borderWidth: 0,
  247. },
  248. series: {
  249. pointPadding: 0,
  250. groupPadding: 0.075
  251. },
  252. },
  253. series: [/*{
  254. name: 'Expected Value',
  255. color: '#555555',
  256. dataLabels: {
  257. enabled: true,
  258. fontSize: 8,
  259. color: '#fff',
  260. align: 'right',
  261. format: '{y:.1f}%',
  262. style: {
  263. //fontWeight: 'bold'
  264. },
  265. y:-1
  266. },
  267. data: [
  268. @foreach($outcomes_colap as $index => $outcome)
  269. @if(
  270. is_array($outcomes_undergraduate_attempted_colap_todo)
  271. && array_key_exists($outcome->id, $outcomes_undergraduate_attempted_colap_todo)
  272. && $outcomes_undergraduate_attempted_colap_todo[$outcome->id]!=0)
  273. @else
  274. 0,
  275. @endif
  276. @endforeach
  277. ]
  278. },*/{
  279. name: 'Obtained Value',
  280. color: '#e70033',
  281. dataLabels: {
  282. enabled: true,
  283. fontSize: 8,
  284. color: '#fff',
  285. align: 'right',
  286. format: '{y:.1f}%',
  287. style: {
  288. //fontWeight: 'bold'
  289. },
  290. y:-1
  291. },
  292. data:[
  293. @foreach($outcomes_colap as $index => $outcome)
  294. @if(
  295. is_array($outcomes_undergraduate_attempted_colap_todo)
  296. && array_key_exists($outcome->id, $outcomes_undergraduate_attempted_colap_todo)
  297. && $outcomes_undergraduate_attempted_colap_todo[$outcome->id]!=0
  298. && isset($outcomes_undergraduate_achieved_colap_todo[$outcome->id]))
  299. {{{ ($outcomes_undergraduate_achieved_colap_todo[$outcome->id]/$outcomes_undergraduate_attempted_colap_todo[$outcome->id])*100 }}},
  300. @else
  301. 0,
  302. @endif
  303. @endforeach
  304. ]
  305. }]
  306. });
  307. $('#graph3').highcharts({
  308. chart: {
  309. type: 'bar'
  310. },
  311. title: {
  312. text: 'Performance of {{ $school->name }} Graduate Students by Learning Outcome'
  313. },
  314. legend: {
  315. reversed: true,
  316. },
  317. xAxis: {
  318. categories: [
  319. @foreach($outcomes_colap as $outcome)
  320. @if(isset($outcomes_graduate_attempted_colap_todo[$outcome->id])
  321. && isset($outcomes_graduate_achieved_colap_todo[$outcome->id]))
  322. "{{{ $outcome->name }}}<br>(N = {{{ $outcomes_graduate_attempted_colap_todo[$outcome->id] }}}, {{{ $outcomes_graduate_achieved_colap_todo[$outcome->id] }}})",
  323. @elseif(isset($outcomes_graduate_attempted_colap_todo[$outcome->id]))
  324. "{{{ $outcome->name }}}<br>(N = {{{ $outcomes_graduate_attempted_colap_todo[$outcome->id] }}}, 0)",
  325. @else
  326. "{{{ $outcome->name }}}<br>(N = 0, 0)",
  327. @endif
  328. @endforeach
  329. ],
  330. labels: {
  331. style: {
  332. fontSize:'11px'
  333. },
  334. step:1,
  335. useHTML:true,
  336. formatter: function() {
  337. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  338. },
  339. }
  340. },
  341. yAxis: {
  342. min: 0,
  343. max: 100,
  344. title: {
  345. text: 'Percentage'
  346. },
  347. plotLines:[{
  348. value:70,
  349. color: '#000',
  350. width:3,
  351. zIndex:4,
  352. label:{
  353. text: 'Goal (70%)',
  354. style: {
  355. color: '#000',
  356. fontSize: '14px',
  357. }
  358. }
  359. }]
  360. },
  361. tooltip: {
  362. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  363. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  364. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  365. footerFormat: '</table>',
  366. shared: true,
  367. useHTML: true
  368. },
  369. plotOptions: {
  370. bar: {
  371. //grouping: false,
  372. shadow: false,
  373. borderWidth: 0,
  374. },
  375. series: {
  376. pointPadding: 0,
  377. groupPadding: 0.075
  378. },
  379. },
  380. series: [/*{
  381. name: 'Expected Value',
  382. color: '#555555',
  383. dataLabels: {
  384. enabled: true,
  385. fontSize: 8,
  386. color: '#fff',
  387. align: 'right',
  388. format: '{y:.1f}%',
  389. style: {
  390. //fontWeight: 'bold'
  391. },
  392. y:-1
  393. },
  394. data: [
  395. @foreach($outcomes_colap as $index => $outcome)
  396. @if(
  397. is_array($outcomes_graduate_attempted_colap_todo)
  398. && array_key_exists($outcome->id, $outcomes_graduate_attempted_colap_todo)
  399. && $outcomes_graduate_attempted_colap_todo[$outcome->id]!=0
  400. )
  401. @else
  402. 0,
  403. @endif
  404. @endforeach
  405. ]
  406. },*/{
  407. name: 'Obtained Value',
  408. color: '#e70033',
  409. dataLabels: {
  410. enabled: true,
  411. fontSize: 8,
  412. color: '#fff',
  413. align: 'right',
  414. format: '{y:.1f}%',
  415. style: {
  416. //fontWeight: 'bold'
  417. },
  418. y:-1
  419. },
  420. data:[
  421. @foreach($outcomes_colap as $index => $outcome)
  422. @if(
  423. is_array($outcomes_graduate_attempted_colap_todo)
  424. && array_key_exists($outcome->id, $outcomes_graduate_attempted_colap_todo)
  425. && $outcomes_graduate_attempted_colap_todo[$outcome->id]!=0
  426. && isset($outcomes_graduate_achieved_colap_todo[$outcome->id]))
  427. {{{ ($outcomes_graduate_achieved_colap_todo[$outcome->id]/$outcomes_graduate_attempted_colap_todo[$outcome->id])*100 }}},
  428. @else
  429. 0,
  430. @endif
  431. @endforeach
  432. ]
  433. }]
  434. });
  435. });
  436. // Include dummy graph for outcomes
  437. @include('global.dummy-outcomes')
  438. @stop