No Description

program_student_result.blade.php 20KB

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