Няма описание

program_student_result.blade.php 21KB

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