No Description

program_student_result.blade.php 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. @extends('layouts.master')
  2. @section('navigation')
  3. @if($role==1)
  4. @include('local.managers.admins._new_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. @if($program->expected_outcome_target == null)
  305. plotLines:[{
  306. value:70,
  307. color: '#000',
  308. width:3,
  309. zIndex:4,
  310. label:{
  311. text: 'Goal (70%)',
  312. style: {
  313. color: '#000',
  314. fontSize: '14px',
  315. }
  316. }
  317. }]
  318. @else
  319. plotLines:[{
  320. value:{{$program->expected_outcome_target->expected_target}},
  321. color: '#000',
  322. width:3,
  323. zIndex:4,
  324. label:{
  325. text: 'Goal ({{$program->expected_outcome_target->expected_target}}%)',
  326. style: {
  327. color: '#000',
  328. fontSize: '14px',
  329. }
  330. }
  331. }]
  332. @endif
  333. },
  334. tooltip: {
  335. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  336. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  337. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  338. footerFormat: '</table>',
  339. shared: true,
  340. useHTML: true
  341. },
  342. plotOptions: {
  343. bar: {
  344. //grouping: false,
  345. shadow: false,
  346. borderWidth: 0,
  347. },
  348. series: {
  349. pointPadding: 0,
  350. groupPadding: 0.075
  351. },
  352. },
  353. series: [{
  354. name: 'Expected Value',
  355. color: '#555555',
  356. dataLabels: {
  357. enabled: true,
  358. fontSize: 8,
  359. color: '#fff',
  360. align: 'right',
  361. format: '{y:.1f}%',
  362. style: {
  363. //fontWeight: 'bold'
  364. },
  365. y:-1
  366. },
  367. data: [
  368. @foreach($outcomes as $index => $outcome)
  369. @if(
  370. is_array($outcomes_attempted)
  371. && array_key_exists($outcome->id, $outcomes_attempted)
  372. && $outcomes_attempted[$outcome->id]!=0)
  373. @else
  374. 0,
  375. @endif
  376. @endforeach
  377. ]
  378. },{
  379. name: 'Obtained Value',
  380. color: '#e70033',
  381. dataLabels: {
  382. enabled: true,
  383. fontSize: 8,
  384. color: '#fff',
  385. align: 'right',
  386. format: '{y:.1f}%',
  387. style: {
  388. //fontWeight: 'bold'
  389. },
  390. y:-1
  391. },
  392. data:[
  393. @foreach($outcomes as $index => $outcome)
  394. @if(
  395. is_array($outcomes_attempted)
  396. && array_key_exists($outcome->id, $outcomes_attempted)
  397. && $outcomes_attempted[$outcome->id]!=0)
  398. {{{ ($outcomes_achieved[$outcome->id]/$outcomes_attempted[$outcome->id])*100 }}},
  399. @else
  400. 0,
  401. @endif
  402. @endforeach
  403. ]
  404. }]
  405. });
  406. $('#graph2').highcharts({
  407. chart: {
  408. type: 'bar'
  409. },
  410. title: {
  411. text: 'Performance of {{ $program->name }} Students by Combined Learning Outcome'
  412. },
  413. legend: {
  414. reversed: true,
  415. },
  416. xAxis: {
  417. categories: [
  418. @foreach($outcomes_colap as $outcome)
  419. "{{{ $outcome->name }}}<br>(N = {{{ $outcomes_attempted_colap[$outcome->id] }}}, {{{ $outcomes_achieved_colap[$outcome->id] }}})",
  420. @endforeach
  421. ],
  422. labels: {
  423. style: {
  424. fontSize:'11px'
  425. },
  426. step:1,
  427. useHTML:true,
  428. formatter: function() {
  429. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  430. },
  431. }
  432. },
  433. yAxis: {
  434. min: 0,
  435. max: 100,
  436. title: {
  437. text: 'Percentage'
  438. }, @if($program->expected_outcome_target == null)
  439. plotLines:[{
  440. value:70,
  441. color: '#000',
  442. width:3,
  443. zIndex:4,
  444. label:{
  445. text: 'Goal (70%)',
  446. style: {
  447. color: '#000',
  448. fontSize: '14px',
  449. }
  450. }
  451. }]
  452. @else
  453. plotLines:[{
  454. value:{{$program->expected_outcome_target->expected_target}},
  455. color: '#000',
  456. width:3,
  457. zIndex:4,
  458. label:{
  459. text: 'Goal ({{$program->expected_outcome_target->expected_target}}%)',
  460. style: {
  461. color: '#000',
  462. fontSize: '14px',
  463. }
  464. }
  465. }]
  466. @endif
  467. },
  468. tooltip: {
  469. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  470. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  471. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  472. footerFormat: '</table>',
  473. shared: true,
  474. useHTML: true
  475. },
  476. plotOptions: {
  477. bar: {
  478. //grouping: false,
  479. shadow: false,
  480. borderWidth: 0,
  481. },
  482. series: {
  483. pointPadding: 0,
  484. groupPadding: 0.075
  485. },
  486. },
  487. series: [{
  488. name: 'Expected Value',
  489. color: '#555555',
  490. dataLabels: {
  491. enabled: true,
  492. fontSize: 8,
  493. color: '#fff',
  494. align: 'right',
  495. format: '{y:.1f}%',
  496. style: {
  497. //fontWeight: 'bold'
  498. },
  499. y:-1
  500. },
  501. data: [
  502. @foreach($outcomes_colap as $index => $outcome)
  503. @if(
  504. is_array($outcomes_attempted_colap)
  505. && array_key_exists($outcome->id, $outcomes_attempted_colap)
  506. && $outcomes_attempted_colap[$outcome->id]!=0)
  507. @else
  508. 0,
  509. @endif
  510. @endforeach
  511. ]
  512. },{
  513. name: 'Obtained Value',
  514. color: '#e70033',
  515. dataLabels: {
  516. enabled: true,
  517. fontSize: 8,
  518. color: '#fff',
  519. align: 'right',
  520. format: '{y:.1f}%',
  521. style: {
  522. //fontWeight: 'bold'
  523. },
  524. y:-1
  525. },
  526. data:[
  527. @foreach($outcomes_colap as $index => $outcome)
  528. @if(
  529. is_array($outcomes_attempted_colap)
  530. && array_key_exists($outcome->id, $outcomes_attempted)
  531. && $outcomes_attempted_colap[$outcome->id]!=0)
  532. {{{ ($outcomes_achieved_colap[$outcome->id]/$outcomes_attempted_colap[$outcome->id])*100 }}},
  533. @else
  534. 0,
  535. @endif
  536. @endforeach
  537. ]
  538. }]
  539. });
  540. // Include dummy graph for outcomes
  541. @include('global.dummy-outcomes')
  542. @stop