No Description

school_student_result.blade.php 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. @extends('layouts.master')
  2. @section('navigation')
  3. @if($role==1)
  4. @include('local.managers.admins._navigation')
  5. @elseif($role==2)
  6. @include('local.managers.sCoords._new_navigation')
  7. @endif
  8. @stop
  9. @section('main')
  10. <a href="{{ action('SchoolsController@show', array($school->id)); }}" class="btn btn-primary pull-left" alt="print">Go to Performance by School Courses</a>
  11. <a href="{{ action('ProgramsController@print_program', array($school->id)); }}" class="btn btn-primary pull-right" alt="print"><span class="glyphicon glyphicon-print"></span></a>
  12. <br>
  13. <br>
  14. <div class="row">
  15. <ul id="resultsTabs" class="nav nav-tabs" role="tablist">
  16. <li role="presentation" class="active"><a href="#combined" aria-controls="combined" role="tab">Combined</a></li>
  17. <li role="presentation"><a href="#uncombined" aria-controls="uncombined" role="tab">Uncombined</a></li>
  18. </ul>
  19. <div>
  20. <!-- <div class="tab-content"> -->
  21. <div role="tabpanel" class="tab-pane active" id="combined">
  22. <div class="row">
  23. <div class="col-md-12" id="graph2"></div>
  24. </div>
  25. <div class="row">
  26. <div class="col-md-12">
  27. <h3>Performance of {{ $school->name }} Students by Combined Learning Outcome</h3>
  28. @if($outcomes->count()>0)
  29. <table class="table table-striped table-condensed datatable">
  30. <thead>
  31. <tr>
  32. <th>Learning Outcome</th>
  33. <th>Program</th>
  34. <th>Program Id</th>
  35. <th>Program Is Graduate</th>
  36. <th>Number Students</th>
  37. <th>Number Students that Achieved the Target</th>
  38. <th>Percentage of Students that Achieved the Target</th>
  39. <th>Semesters</th>
  40. </tr>
  41. </thead>
  42. <tfoot>
  43. <tr class="column-search">
  44. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  45. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  46. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  47. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  48. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  49. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  50. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  51. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  52. </tr>
  53. </tfoot>
  54. <tbody>
  55. @foreach($programs as $program)
  56. @foreach($outcomes_colap as $outcome)
  57. @if(isset($outcomes_attempted_colap[$program->id][$outcome->id]))
  58. <tr>
  59. <td>{{ link_to_action('OutcomesController@show', $outcome->name, array($outcome->id), $attributes = array()) }}</td>
  60. <td>{{{ $program->name }}}</td>
  61. <td>{{{ $program->id }}}</td>
  62. <td>{{{ $program->is_graduate }}}</td>
  63. <td>{{{ $outcomes_attempted_colap[$program->id][$outcome->id] }}}</td>
  64. <td>{{{ $outcomes_achieved_colap[$program->id][$outcome->id] }}}</td>
  65. <td>
  66. @if($outcomes_attempted_colap[$program->id][$outcome->id]!=0)
  67. {{{ round($outcomes_achieved_colap[$program->id][$outcome->id] / $outcomes_attempted_colap[$program->id][$outcome->id]*100, 2) }}}%
  68. @else
  69. N/M
  70. @endif
  71. </td>
  72. <td>
  73. @if(isset($outcomes_attempted_colap_semesters[$program->id][$outcome->id]))
  74. {{{ str_replace('"','',json_encode($outcomes_attempted_colap_semesters[$program->id][$outcome->id])) }}}
  75. @else
  76. N/M
  77. @endif
  78. </td>
  79. </tr>
  80. @endif
  81. @endforeach
  82. @endforeach
  83. </tbody>
  84. </table>
  85. @else
  86. <p class="lead"> No courses assigned.</p>
  87. @endif
  88. </div>
  89. </div>
  90. </div>
  91. <div role="tabpanel" class="tab-pane" id="uncombined">
  92. <div class="row">
  93. <div class="col-md-12" id="graph"></div>
  94. </div>
  95. <div class="row">
  96. <div class="col-md-12">
  97. <h3>Performance of {{ $school->name }} Students by Uncombined Learning Outcome</h3>
  98. @if($outcomes->count()>0)
  99. <table class="table table-striped table-condensed datatable">
  100. <thead>
  101. <tr>
  102. <th>Learning Outcome</th>
  103. <th>Program</th>
  104. <th>Program Id</th>
  105. <th>Program Is Graduate</th>
  106. <th>Number Students</th>
  107. <th>Number Students that Achieved the Target</th>
  108. <th>Percentage of Students that Achieved the Target</th>
  109. <th>Semesters</th>
  110. </tr>
  111. </thead>
  112. <tfoot>
  113. <tr class="column-search">
  114. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  115. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  116. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  117. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  118. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  119. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  120. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  121. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  122. </tr>
  123. </tfoot>
  124. <tbody>
  125. @foreach($programs as $program)
  126. @foreach($outcomes as $outcome)
  127. @if(isset($outcomes_attempted[$program->id][$outcome->id]))
  128. <tr>
  129. <td>{{ link_to_action('OutcomesController@show', $outcome->name, array($outcome->id), $attributes = array()) }}</td>
  130. <td>{{{ $program->name }}}</td>
  131. <td>{{{ $program->id }}}</td>
  132. <td>{{{ $program->is_graduate }}}</td>
  133. <td>{{{ $outcomes_attempted[$program->id][$outcome->id] }}}</td>
  134. <td>{{{ $outcomes_achieved[$program->id][$outcome->id] }}}</td>
  135. <td>
  136. @if($outcomes_attempted[$program->id][$outcome->id]!=0)
  137. {{{ round($outcomes_achieved[$program->id][$outcome->id] / $outcomes_attempted[$program->id][$outcome->id]*100, 2) }}}%
  138. @else
  139. N/M
  140. @endif
  141. </td>
  142. <td>
  143. @if(isset($outcomes_attempted_semesters[$program->id][$outcome->id]))
  144. {{{ str_replace('"','',json_encode($outcomes_attempted_semesters[$program->id][$outcome->id])) }}}
  145. @else
  146. N/M
  147. @endif
  148. </td>
  149. </tr>
  150. @endif
  151. @endforeach
  152. @endforeach
  153. </tbody>
  154. </table>
  155. @else
  156. <p class="lead"> No courses assigned.</p>
  157. @endif
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. <!-- =================== tabs =================== -->
  164. <div class="row">
  165. <!-- Nav tabs -->
  166. <!-- Tab panes -->
  167. <ul id="programTabs" class="nav nav-tabs" role="tablist">
  168. <li role="presentation" class="active"><a href="#courses" aria-controls="courses" role="tab">Courses</a></li>
  169. <li role="presentation"><a href="#contact" aria-controls="contact" role="tab">Contact Information</a></li>
  170. </ul>
  171. <div class="tab-content">
  172. <div role="tabpanel" class="tab-pane active" id="courses">
  173. <div class="row">
  174. <div class="col-md-12">
  175. <h3>Courses in this program</h3>
  176. @if(count($grouped_courses)>0)
  177. <table class="table table-striped table-condensed datatable">
  178. <thead>
  179. <tr>
  180. <th>Identifier</th>
  181. <th>Name</th>
  182. <th>Course Program</th>
  183. <th>Number of Students</th>
  184. </tr>
  185. </thead>
  186. <tfoot>
  187. <tr class="column-search">
  188. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  189. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  190. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  191. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  192. </tr>
  193. </tfoot>
  194. <tbody>
  195. @foreach($grouped_courses as $grouped_course)
  196. <tr>
  197. <td class="col-md-2">{{ HTML::linkAction('CoursesController@showGrouped', $grouped_course->code.$grouped_course->number.' ('.$grouped_course->semester->code.')', array($grouped_course->code, $grouped_course->number, $grouped_course->semester->code)) }}</td>
  198. <td class="col-md-4">{{{ $grouped_course->name}}}</td>
  199. <td class="col-md-2">{{{ $grouped_course->program_code}}}</td>
  200. <td class="col-md-3">{{{ $grouped_course->quantity }}}</td>
  201. </tr>
  202. @endforeach
  203. </tbody>
  204. </table>
  205. @else
  206. <p class="lead"> No courses assigned.</p>
  207. @endif
  208. </div>
  209. </div>
  210. </div>
  211. <div role="tabpanel" class="tab-pane" id="contact">
  212. <div class="row">
  213. <div class="col-md-12">
  214. <h3>Contact Information</h3>
  215. <table class="table table-striped datatable">
  216. <thead>
  217. <tr>
  218. <th>Name</th>
  219. <th>Role</th>
  220. <th>Program</th>
  221. <th>Email</th>
  222. <th>Office Phone</th>
  223. </tr>
  224. </thead>
  225. <tfoot>
  226. <tr class="column-search">
  227. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  228. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  229. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  230. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  231. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  232. </tr>
  233. </tfoot>
  234. <tbody>
  235. @foreach($users as $user)
  236. <tr>
  237. <td>{{ $user->surnames }}, {{ $user->first_name }}</td>
  238. @if($user->role == 1)
  239. <td>Administrator</td>
  240. <td>All</td>
  241. @elseif($user->role == 2)
  242. <td>School Coordinator</td>
  243. <td>All in {{ $program->school->name }}</td>
  244. @elseif($user->role == 3)
  245. <td>Program Coordinator</td>
  246. <td>
  247. @foreach ($user->programs as $program)
  248. {{ $program->name }}&nbsp;
  249. @endforeach
  250. </td>
  251. @else
  252. <td>Professor</td>
  253. <td>
  254. @foreach ($user->programs as $program)
  255. {{ $program->name }}&nbsp;
  256. @endforeach
  257. </td>
  258. @endif
  259. <td>
  260. <a href="mailto:{{ $user->email }}">{{ $user->email }}</a>
  261. </td>
  262. <td>
  263. @if($user->office_phone)
  264. {{{ $user->office_phone }}}
  265. @if($user->office_extension)
  266. <span>ext.</span> {{{ $user->office_extension }}}
  267. @endif
  268. @else
  269. Not set
  270. @endif
  271. </td>
  272. </tr>
  273. @endforeach
  274. </tbody>
  275. </table>
  276. </div>
  277. </div>
  278. </div>
  279. </div>
  280. </div>
  281. <!-- =================== end tabs =================== -->
  282. @stop
  283. @section('included-js')
  284. <!-- HighCharts -->
  285. <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
  286. <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
  287. <!-- Datatables -->
  288. @include('global._datatables_js')
  289. @stop
  290. @section('javascript')
  291. $('#programTabs a').click(function (e) {
  292. e.preventDefault()
  293. $(this).tab('show');
  294. });
  295. $('#graph').highcharts({
  296. chart: {
  297. type: 'bar'
  298. },
  299. title: {
  300. text: 'Performance of {{ $school->name }} Students by Uncombined Learning Outcome'
  301. },
  302. legend: {
  303. reversed: true,
  304. },
  305. xAxis: {
  306. categories: [
  307. @foreach($outcomes as $outcome)
  308. @if(isset($outcomes_attempted_todo[$outcome->id]))
  309. "{{{ $outcome->name }}}<br>(N = {{{ $outcomes_attempted_todo[$outcome->id] }}}, {{{ $outcomes_achieved_todo[$outcome->id] }}})",
  310. @else
  311. "{{{ $outcome->name }}}<br>(N = 0, 0)",
  312. @endif
  313. @endforeach
  314. ],
  315. labels: {
  316. style: {
  317. fontSize:'11px'
  318. },
  319. step:1,
  320. useHTML:true,
  321. formatter: function() {
  322. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  323. },
  324. }
  325. },
  326. yAxis: {
  327. min: 0,
  328. max: 100,
  329. title: {
  330. text: 'Percentage'
  331. },
  332. plotLines:[{
  333. value:70,
  334. color: '#000',
  335. width:3,
  336. zIndex:4,
  337. label:{
  338. text: 'Goal (70%)',
  339. style: {
  340. color: '#000',
  341. fontSize: '14px',
  342. }
  343. }
  344. }]
  345. },
  346. tooltip: {
  347. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  348. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  349. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  350. footerFormat: '</table>',
  351. shared: true,
  352. useHTML: true
  353. },
  354. plotOptions: {
  355. bar: {
  356. //grouping: false,
  357. shadow: false,
  358. borderWidth: 0,
  359. },
  360. series: {
  361. pointPadding: 0,
  362. groupPadding: 0.075
  363. },
  364. },
  365. series: [{
  366. name: 'Expected Value',
  367. color: '#555555',
  368. dataLabels: {
  369. enabled: true,
  370. fontSize: 8,
  371. color: '#fff',
  372. align: 'right',
  373. format: '{y:.1f}%',
  374. style: {
  375. //fontWeight: 'bold'
  376. },
  377. y:-1
  378. },
  379. data: [
  380. @foreach($outcomes as $index => $outcome)
  381. @if(
  382. is_array($outcomes_attempted_todo)
  383. && array_key_exists($outcome->id, $outcomes_attempted_todo)
  384. && $outcomes_attempted_todo[$outcome->id]!=0)
  385. @else
  386. 0,
  387. @endif
  388. @endforeach
  389. ]
  390. },{
  391. name: 'Obtained Value',
  392. color: '#e70033',
  393. dataLabels: {
  394. enabled: true,
  395. fontSize: 8,
  396. color: '#fff',
  397. align: 'right',
  398. format: '{y:.1f}%',
  399. style: {
  400. //fontWeight: 'bold'
  401. },
  402. y:-1
  403. },
  404. data:[
  405. @foreach($outcomes as $index => $outcome)
  406. @if(
  407. is_array($outcomes_attempted_todo)
  408. && array_key_exists($outcome->id, $outcomes_attempted_todo)
  409. && $outcomes_attempted_todo[$outcome->id]!=0)
  410. {{{ ($outcomes_achieved_todo[$outcome->id]/$outcomes_attempted_todo[$outcome->id])*100 }}},
  411. @else
  412. 0,
  413. @endif
  414. @endforeach
  415. ]
  416. }]
  417. });
  418. $('#graph2').highcharts({
  419. chart: {
  420. type: 'bar'
  421. },
  422. title: {
  423. text: 'Performance of {{ $school->name }} Students by Combined Learning Outcome'
  424. },
  425. legend: {
  426. reversed: true,
  427. },
  428. xAxis: {
  429. categories: [
  430. @foreach($outcomes_colap as $outcome)
  431. "{{{ $outcome->name }}}<br>(N = {{{ $outcomes_attempted_colap_todo[$outcome->id] }}}, {{{ $outcomes_achieved_colap_todo[$outcome->id] }}})",
  432. @endforeach
  433. ],
  434. labels: {
  435. style: {
  436. fontSize:'11px'
  437. },
  438. step:1,
  439. useHTML:true,
  440. formatter: function() {
  441. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  442. },
  443. }
  444. },
  445. yAxis: {
  446. min: 0,
  447. max: 100,
  448. title: {
  449. text: 'Percentage'
  450. },
  451. plotLines:[{
  452. value:70,
  453. color: '#000',
  454. width:3,
  455. zIndex:4,
  456. label:{
  457. text: 'Goal (70%)',
  458. style: {
  459. color: '#000',
  460. fontSize: '14px',
  461. }
  462. }
  463. }]
  464. },
  465. tooltip: {
  466. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  467. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  468. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  469. footerFormat: '</table>',
  470. shared: true,
  471. useHTML: true
  472. },
  473. plotOptions: {
  474. bar: {
  475. //grouping: false,
  476. shadow: false,
  477. borderWidth: 0,
  478. },
  479. series: {
  480. pointPadding: 0,
  481. groupPadding: 0.075
  482. },
  483. },
  484. series: [{
  485. name: 'Expected Value',
  486. color: '#555555',
  487. dataLabels: {
  488. enabled: true,
  489. fontSize: 8,
  490. color: '#fff',
  491. align: 'right',
  492. format: '{y:.1f}%',
  493. style: {
  494. //fontWeight: 'bold'
  495. },
  496. y:-1
  497. },
  498. data: [
  499. @foreach($outcomes_colap as $index => $outcome)
  500. @if(
  501. is_array($outcomes_attempted_colap_todo)
  502. && array_key_exists($outcome->id, $outcomes_attempted_colap_todo)
  503. && $outcomes_attempted_colap_todo[$outcome->id]!=0)
  504. @else
  505. 0,
  506. @endif
  507. @endforeach
  508. ]
  509. },{
  510. name: 'Obtained Value',
  511. color: '#e70033',
  512. dataLabels: {
  513. enabled: true,
  514. fontSize: 8,
  515. color: '#fff',
  516. align: 'right',
  517. format: '{y:.1f}%',
  518. style: {
  519. //fontWeight: 'bold'
  520. },
  521. y:-1
  522. },
  523. data:[
  524. @foreach($outcomes_colap as $index => $outcome)
  525. @if(
  526. is_array($outcomes_attempted_colap_todo)
  527. && array_key_exists($outcome->id, $outcomes_attempted_todo)
  528. && $outcomes_attempted_colap_todo[$outcome->id]!=0)
  529. {{{ ($outcomes_achieved_colap_todo[$outcome->id]/$outcomes_attempted_colap_todo[$outcome->id])*100 }}},
  530. @else
  531. 0,
  532. @endif
  533. @endforeach
  534. ]
  535. }]
  536. });
  537. // Include dummy graph for outcomes
  538. @include('global.dummy-outcomes')
  539. @stop