No Description

program_student_result.blade.php 22KB

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