Ingen beskrivning

program_student_result.blade.php 21KB

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