Brak opisu

school-uhs.blade.php 38KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777
  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('SchoolsController@print_school', array($school->id)); }}" class="btn btn-primary pull-right" alt="print"><span class="glyphicon glyphicon-print"></span></a>
  11. <br>
  12. <br>
  13. <!-- Nav tabs -->
  14. <ul id="levelTabs" class="nav nav-tabs" role="tablist">
  15. <li role="presentation" class="active"><a href="#undergraduate" aria-controls="undergraduate" role="tab">Secondary level</a></li>
  16. <!-- <li role="presentation"><a href="#graduate" aria-controls="graduate" role="tab">Graduate</a></li> -->
  17. </ul>
  18. <!-- Tab panes -->
  19. <div class="tab-content">
  20. <div role="tabpanel" class="tab-pane active" id="undergraduate">
  21. <div class="row">
  22. <div class="col-md-9 graph" id="graph-undergrad"></div>
  23. <div class="col-md-3">
  24. <br>
  25. <div class="panel panel-default panel-scrolling">
  26. <div class="panel-heading" role="tab" id="headingOne">
  27. <h4 class="panel-title">
  28. Programs
  29. </h4>
  30. </div>
  31. <div class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
  32. <table class="table table-striped table-condensed">
  33. <tr>
  34. <th>Name</th>
  35. <th>Participation</th>
  36. </tr>
  37. @foreach ($undergrad_programs as $program)
  38. <tr>
  39. <td>{{ HTML::linkAction('ProgramsController@show', $program->name, array($program->id)) }}</td>
  40. <td class="text-center">
  41. @if(in_array($program->id, $participating_programs))
  42. <span class="glyphicon glyphicon-ok"></span>
  43. @endif
  44. </td>
  45. </tr>
  46. @endforeach
  47. </table>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. <div>
  53. <!-- Nav tabs -->
  54. <ul id="undergradSchoolTabs" class="nav nav-tabs" role="tablist">
  55. <li role="presentation" class="active"><a href="#undergrad-outcomes-assessed" aria-controls="undergrad-outcomes-assessed" role="tab">Assessment Results by Learning Outcomes in Academic Programs</a></li>
  56. <li role="presentation"><a href="#undergrad-courses" aria-controls="undergrad-courses" role="tab">Secondary Level Courses</a></li>
  57. <li role="presentation"><a href="#undergrad-sections" aria-controls="undergrad-sections" role="tab">Sections</a></li>
  58. </ul>
  59. <!-- Tab panes -->
  60. <div class="tab-content">
  61. <div role="tabpanel" class="tab-pane active" id="undergrad-outcomes-assessed">
  62. <div class="row">
  63. <div class="col-md-12">
  64. <table class="table table-striped table-condensed">
  65. <thead>
  66. <th>Learning Outcome</th>
  67. <th>Programs doing Assessment</th>
  68. <th>Programs Achieved</th>
  69. <th>Success Rate</th>
  70. </thead>
  71. <tbody>
  72. @foreach($outcomes as $outcome)
  73. <tr>
  74. <td class="col-md-6">{{ link_to_action('OutcomesController@show', $outcome->name, array($outcome->id), $attributes = array()) }}</td>
  75. <td class="col-md-2">{{{ $attemptedUndergradProgramsPerOutcome[$outcome->id] }}}</td>
  76. <td class="col-md-2">{{{ $achievedUndergradProgramsPerOutcome[$outcome->id] }}}</td>
  77. <td class="col-md-2">
  78. @if($attemptedUndergradProgramsPerOutcome[$outcome->id]!=0)
  79. {{{ round($achievedUndergradProgramsPerOutcome[$outcome->id] / $attemptedUndergradProgramsPerOutcome[$outcome->id]*100, 2) }}}%
  80. @else
  81. N/M
  82. @endif
  83. </td>
  84. </tr>
  85. @endforeach
  86. </tbody>
  87. <tfoot></tfoot>
  88. <caption>N/M: Not Measured</caption>
  89. </table>
  90. </div>
  91. </div>
  92. </div>
  93. <div role="tabpanel" class="tab-pane" id="undergrad-courses">
  94. <div class="row">
  95. <div class="col-md-12">
  96. <br>
  97. <h3>Courses in this school</h3>
  98. <p>Note that some sections may have assessed activities but unpublished results. Unpublished results are <strong>not considered</strong>. Check the Sections tab for a breakdown.</p>
  99. @if($undergrad_school_sections_count>0)
  100. <table class="table table-striped table-condensed datatable">
  101. <thead>
  102. <tr>
  103. <th>Identifier</th>
  104. <th>Name</th>
  105. <th>Program</th>
  106. <th>Assessed and Published</th>
  107. </tr>
  108. </thead>
  109. <tfoot>
  110. <tr class="column-search">
  111. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  112. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  113. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  114. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  115. </tr>
  116. </tfoot>
  117. <tbody>
  118. @foreach($undergrad_grouped_courses as $grouped_course)
  119. <tr>
  120. <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>
  121. <td class="col-md-4">{{{ $grouped_course->name}}}</td>
  122. <td class="col-md-2">{{{ $grouped_course->program->name }}}</td>
  123. <td class="col-md-1">
  124. @if($grouped_course->outcomes_attempted!=NULL)
  125. Yes
  126. @else
  127. No
  128. @endif
  129. </td>
  130. </tr>
  131. @endforeach
  132. </tbody>
  133. </table>
  134. @else
  135. <p class="lead"> No courses doing Assessment (0%)</p>
  136. @endif
  137. </div>
  138. </div>
  139. </div>
  140. <div role="tabpanel" class="tab-pane" id="undergrad-sections">
  141. <div class="row">
  142. <div class="col-md-12">
  143. <br>
  144. @if($undergrad_school_sections_count>0)
  145. <h3>Sections in this school</h3>
  146. <p class="lead"> {{{ $undergrad_assessed_sections_count }}} out of {{{ $undergrad_school_sections_count }}} section(s) doing Assessment ({{{ round($undergrad_assessed_sections_count/$undergrad_school_sections_count*100, 2) }}}%)</p>
  147. <p>Note that some sections may have assessed activities but unpublished results. Unplublished results are <strong>not considered</strong>.</p>
  148. <table class="table table-striped table-condensed datatable">
  149. <thead>
  150. <tr>
  151. <th>Identifier</th>
  152. <th>Name</th>
  153. <th>Program</th>
  154. <th>Professor</th>
  155. <th>Assessed Activities</th>
  156. <th>Published Results</th>
  157. </tr>
  158. </thead>
  159. <tfoot>
  160. <tr class="column-search">
  161. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  162. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  163. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  164. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  165. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  166. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  167. </tr>
  168. </tfoot>
  169. <tbody>
  170. @foreach($school->programs as $program)
  171. @foreach($program->courses as $course)
  172. <tr>
  173. <td class="col-md-2">{{ HTML::linkAction('CoursesController@showLimited', $course->code.$course->number.'-'.$course->section.' ('.$course->semester->code.')', array('id'=>$course->id)) }}</td>
  174. <td class="col-md-3">{{{ $course->name}}}</td>
  175. <td class="col-md-2">{{{ $course->program->name }}}</td>
  176. <td class="col-md-3">{{{ $course->user->surnames }}}, {{{ $course->user->first_name }}}</td>
  177. <td class="col-md-1">
  178. @if(count($course->assessedActivities))
  179. Yes
  180. @else
  181. No
  182. @endif
  183. </td>
  184. <td class="col-md-1">
  185. @if(count($course->publishedActivities))
  186. Yes
  187. @else
  188. No
  189. @endif
  190. </td>
  191. </tr>
  192. @endforeach
  193. @endforeach
  194. </tbody>
  195. </table>
  196. @else
  197. <p class="lead"> No sections doing Assessment (0%)</p>
  198. @endif
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. </div>
  204. </div>
  205. <div role="tabpanel" class="tab-pane" id="graduate">
  206. <div class="row">
  207. <div class="col-md-9 graph" id="graph-grad"></div>
  208. <div class="col-md-3">
  209. <br>
  210. <div class="panel panel-default panel-scrolling">
  211. <div class="panel-heading" role="tab" id="headingOne">
  212. <h4 class="panel-title">
  213. Programs
  214. </h4>
  215. </div>
  216. <div class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
  217. <table class="table table-striped table-condensed">
  218. <tr>
  219. <th>Name</th>
  220. <th>Participation</th>
  221. </tr>
  222. @foreach ($grad_programs as $program)
  223. <tr>
  224. <td>{{ HTML::linkAction('ProgramsController@show', $program->name, array($program->id)) }}</td>
  225. <td class="text-center">
  226. @if(in_array($program->id, $participating_programs))
  227. <span class="glyphicon glyphicon-ok"></span>
  228. @endif
  229. </td>
  230. </tr>
  231. @endforeach
  232. </table>
  233. </div>
  234. </div>
  235. </div>
  236. </div>
  237. <div>
  238. <!-- Nav tabs -->
  239. <ul id="gradSchoolTabs" class="nav nav-tabs" role="tablist">
  240. <li role="presentation" class="active"><a href="#grad-outcomes-assessed" aria-controls="grad-outcomes-assessed" role="tab">Assessment Results by Learning Outcomes in Academic Programs</a></li>
  241. <li role="presentation"><a href="#grad-courses" aria-controls="grad-courses" role="tab"> Graduate Courses</a></li>
  242. <li role="presentation"><a href="#grad-sections" aria-controls="grad-sections" role="tab">Sections</a></li>
  243. </ul>
  244. <!-- Tab panes -->
  245. <div class="tab-content">
  246. <div role="tabpanel" class="tab-pane active" id="grad-outcomes-assessed">
  247. <div class="row">
  248. <div class="col-md-12">
  249. <table class="table table-striped table-condensed">
  250. <thead>
  251. <th>Learning Outcome</th>
  252. <th>Programs doing Assessment</th>
  253. <th>Programs Achieved</th>
  254. <th>Success Rate</th>
  255. </thead>
  256. <tbody>
  257. @foreach($outcomes as $outcome)
  258. <tr>
  259. <td class="col-md-6">{{ link_to_action('OutcomesController@show', $outcome->name, array($outcome->id), $attributes = array()) }}</td>
  260. <td class="col-md-2">{{{ $attemptedGradProgramsPerOutcome[$outcome->id] }}}</td>
  261. <td class="col-md-2">{{{ $achievedGradProgramsPerOutcome[$outcome->id] }}}</td>
  262. <td class="col-md-2">
  263. @if($attemptedGradProgramsPerOutcome[$outcome->id]!=0)
  264. {{{ round($achievedGradProgramsPerOutcome[$outcome->id] / $attemptedGradProgramsPerOutcome[$outcome->id]*100, 2) }}}%
  265. @else
  266. N/M
  267. @endif
  268. </td>
  269. </tr>
  270. @endforeach
  271. </tbody>
  272. <tfoot></tfoot>
  273. <caption>N/M: Not Measured</caption>
  274. </table>
  275. </div>
  276. </div>
  277. </div>
  278. <div role="tabpanel" class="tab-pane" id="grad-courses">
  279. <div class="row">
  280. <div class="col-md-12">
  281. <br>
  282. <h3>Courses in this school</h3>
  283. <p>Note that some sections may have assessed activities but unpublished results. Unpublished results are <strong>not considered</strong>. Check the Sections tab for a breakdown.</p>
  284. @if($grad_school_sections_count>0)
  285. <table class="table table-striped table-condensed datatable">
  286. <thead>
  287. <tr>
  288. <th>Identifier</th>
  289. <th>Name</th>
  290. <th>Program</th>
  291. <th>Assessed and Published</th>
  292. </tr>
  293. </thead>
  294. <tfoot>
  295. <tr class="column-search">
  296. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  297. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  298. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  299. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  300. </tr>
  301. </tfoot>
  302. <tbody>
  303. @foreach($grad_grouped_courses as $grouped_course)
  304. <tr>
  305. <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>
  306. <td class="col-md-4">{{{ $grouped_course->name}}}</td>
  307. <td class="col-md-2">{{{ $grouped_course->program->name }}}</td>
  308. <td class="col-md-1">
  309. @if($grouped_course->outcomes_attempted!=NULL)
  310. Yes
  311. @else
  312. No
  313. @endif
  314. </td>
  315. </tr>
  316. @endforeach
  317. </tbody>
  318. </table>
  319. @else
  320. <p class="lead"> No courses doing Assessment (0%)</p>
  321. @endif
  322. </div>
  323. </div>
  324. </div>
  325. <div role="tabpanel" class="tab-pane" id="grad-sections">
  326. <div class="row">
  327. <div class="col-md-12">
  328. <br>
  329. @if($grad_school_sections_count>0)
  330. <h3>Sections in this school</h3>
  331. <p class="lead"> {{{ $grad_assessed_sections_count }}} out of {{{ $grad_school_sections_count }}} section(s) doing Assessment ({{{ round($grad_assessed_sections_count/$grad_school_sections_count*100, 2) }}}%)</p>
  332. <p>Note that some sections may have assessed activities but unpublished results. Unplublished results are <strong>not considered</strong>.</p>
  333. <table class="table table-striped table-condensed datatable">
  334. <thead>
  335. <tr>
  336. <th>Identifier</th>
  337. <th>Name</th>
  338. <th>Program</th>
  339. <th>Professor</th>
  340. <th>Assessed Activities</th>
  341. <th>Published Results</th>
  342. </tr>
  343. </thead>
  344. <tfoot>
  345. <tr class="column-search">
  346. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  347. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  348. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  349. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  350. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  351. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  352. </tr>
  353. </tfoot>
  354. <tbody>
  355. @foreach($school->programs as $program)
  356. @foreach($program->courses as $course)
  357. <tr>
  358. <td class="col-md-2">{{ HTML::linkAction('CoursesController@showLimited', $course->code.$course->number.'-'.$course->section.' ('.$course->semester->code.')', array('id'=>$course->id)) }}</td>
  359. <td class="col-md-3">{{{ $course->name}}}</td>
  360. <td class="col-md-2">{{{ $course->program->name }}}</td>
  361. <td class="col-md-3">{{{ $course->user->surnames }}}, {{{ $course->user->first_name }}}</td>
  362. <td class="col-md-1">
  363. @if(count($course->assessedActivities))
  364. Yes
  365. @else
  366. No
  367. @endif
  368. </td>
  369. <td class="col-md-1">
  370. @if(count($course->publishedActivities))
  371. Yes
  372. @else
  373. No
  374. @endif
  375. </td>
  376. </tr>
  377. @endforeach
  378. @endforeach
  379. </tbody>
  380. </table>
  381. @else
  382. <p class="lead"> No sections doing Assessment (0%)</p>
  383. @endif
  384. </div>
  385. </div>
  386. </div>
  387. </div>
  388. </div>
  389. </div>
  390. </div>
  391. @stop
  392. @section('included-js')
  393. <!-- HighCharts -->
  394. <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
  395. <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
  396. <!-- Datatables -->
  397. @include('global._datatables_js')
  398. @stop
  399. @section('javascript')
  400. $(function () {
  401. $('#undergradSchoolTabs a').click(function (e) {
  402. e.preventDefault()
  403. $(this).tab('show');
  404. });
  405. $('#gradSchoolTabs a').click(function (e) {
  406. e.preventDefault()
  407. $(this).tab('show');
  408. });
  409. $('#levelTabs a').click(function (e) {
  410. e.preventDefault()
  411. $(this).tab('show');
  412. $('#graph-undergrad').highcharts({
  413. chart: {
  414. type: 'bar'
  415. },
  416. title: {
  417. text: 'Secondary Level Performance by Learning Outcome Criteria in {{ $school->name }}'
  418. },
  419. legend: {
  420. reversed: true,
  421. },
  422. xAxis: {
  423. categories: [
  424. @foreach($outcomes as $outcome)
  425. "{{{ $outcome->name }}}",
  426. @endforeach
  427. ],
  428. labels: {
  429. style: {
  430. fontSize:'11px'
  431. },
  432. step:1,
  433. useHTML:true,
  434. formatter: function() {
  435. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  436. },
  437. }
  438. },
  439. yAxis: {
  440. min: 0,
  441. max: 100,
  442. title: {
  443. text: 'Percentage'
  444. }
  445. },
  446. tooltip: {
  447. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  448. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  449. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  450. footerFormat: '</table>',
  451. shared: true,
  452. useHTML: true
  453. },
  454. plotOptions: {
  455. bar: {
  456. //grouping: false,
  457. shadow: false,
  458. borderWidth: 0,
  459. },
  460. series: {
  461. pointPadding: 0,
  462. groupPadding: 0.075
  463. },
  464. },
  465. series: [{
  466. name: 'Expected Value',
  467. color: '#555555',
  468. dataLabels: {
  469. enabled: true,
  470. fontSize: 8,
  471. color: '#fff',
  472. align: 'right',
  473. format: '{y:.1f}%',
  474. style: {
  475. //fontWeight: 'bold'
  476. },
  477. y:-1
  478. },
  479. data: [
  480. @foreach($outcomes as $index => $outcome)
  481. @if(
  482. is_array($undergrad_outcomes_attempted)
  483. && array_key_exists($outcome->id, $undergrad_outcomes_attempted)
  484. && $undergrad_outcomes_attempted[$outcome->id]!=0)
  485. {{{ $outcome->expected_outcome }}},
  486. @else
  487. 0,
  488. @endif
  489. @endforeach
  490. ],
  491. pointPadding: 0,
  492. }, {
  493. name: 'Obtained Value',
  494. color: '#e70033',
  495. dataLabels: {
  496. enabled: true,
  497. fontSize: 8,
  498. color: '#fff',
  499. align: 'right',
  500. format: '{y:.1f}%',
  501. style: {
  502. //fontWeight: 'bold'
  503. },
  504. y:-1
  505. },
  506. data:[
  507. @foreach($outcomes as $index => $outcome)
  508. @if(
  509. is_array($undergrad_outcomes_attempted)
  510. && array_key_exists($outcome->id, $undergrad_outcomes_attempted)
  511. && $undergrad_outcomes_attempted[$outcome->id]!=0)
  512. {{{ ($undergrad_outcomes_achieved[$outcome->id]/$undergrad_outcomes_attempted[$outcome->id])*100 }}},
  513. @else
  514. 0,
  515. @endif
  516. @endforeach
  517. ],
  518. pointPadding: 0,
  519. }]
  520. });
  521. $('#graph-grad').highcharts({
  522. chart: {
  523. type: 'bar'
  524. },
  525. title: {
  526. text: 'Graduate Performance by Learning Outcome Criteria in {{ $school->name }}'
  527. },
  528. legend: {
  529. reversed: true,
  530. },
  531. xAxis: {
  532. categories: [
  533. @foreach($outcomes as $outcome)
  534. "{{{ $outcome->name }}}",
  535. @endforeach
  536. ],
  537. labels: {
  538. style: {
  539. fontSize:'11px'
  540. },
  541. step:1,
  542. useHTML:true,
  543. formatter: function() {
  544. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  545. },
  546. }
  547. },
  548. yAxis: {
  549. min: 0,
  550. max: 100,
  551. title: {
  552. text: 'Percentage'
  553. }
  554. },
  555. tooltip: {
  556. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  557. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  558. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  559. footerFormat: '</table>',
  560. shared: true,
  561. useHTML: true
  562. },
  563. plotOptions: {
  564. bar: {
  565. //grouping: false,
  566. shadow: false,
  567. borderWidth: 0,
  568. },
  569. series: {
  570. pointPadding: 0,
  571. groupPadding: 0.075
  572. },
  573. },
  574. series: [{
  575. name: 'Expected Value',
  576. color: '#555555',
  577. dataLabels: {
  578. enabled: true,
  579. fontSize: 8,
  580. color: '#fff',
  581. align: 'right',
  582. format: '{y:.1f}%',
  583. style: {
  584. //fontWeight: 'bold'
  585. },
  586. y:-1
  587. },
  588. data: [
  589. @foreach($outcomes as $index => $outcome)
  590. @if(
  591. is_array($grad_outcomes_attempted)
  592. && array_key_exists($outcome->id, $grad_outcomes_attempted)
  593. && $grad_outcomes_attempted[$outcome->id]!=0)
  594. {{{ $outcome->expected_outcome }}},
  595. @else
  596. 0,
  597. @endif
  598. @endforeach
  599. ],
  600. pointPadding: 0,
  601. }, {
  602. name: 'Obtained Value',
  603. color: '#e70033',
  604. dataLabels: {
  605. enabled: true,
  606. fontSize: 8,
  607. color: '#fff',
  608. align: 'right',
  609. format: '{y:.1f}%',
  610. style: {
  611. //fontWeight: 'bold'
  612. },
  613. y:-1
  614. },
  615. data:[
  616. @foreach($outcomes as $index => $outcome)
  617. @if(
  618. is_array($grad_outcomes_attempted)
  619. && array_key_exists($outcome->id, $grad_outcomes_attempted)
  620. && $grad_outcomes_attempted[$outcome->id]!=0)
  621. {{{ ($grad_outcomes_achieved[$outcome->id]/$grad_outcomes_attempted[$outcome->id])*100 }}},
  622. @else
  623. 0,
  624. @endif
  625. @endforeach
  626. ],
  627. pointPadding: 0,
  628. }]
  629. });
  630. });
  631. $('#graph-undergrad').highcharts({
  632. chart: {
  633. type: 'bar'
  634. },
  635. title: {
  636. text: 'Seconday Level Performance by Learning Outcome Criteria in {{ $school->name }}'
  637. },
  638. legend: {
  639. reversed: true,
  640. },
  641. xAxis: {
  642. categories: [
  643. @foreach($outcomes as $outcome)
  644. "{{{ $outcome->name }}}",
  645. @endforeach
  646. ],
  647. labels: {
  648. style: {
  649. fontSize:'11px'
  650. },
  651. step:1,
  652. useHTML:true,
  653. formatter: function() {
  654. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  655. },
  656. }
  657. },
  658. yAxis: {
  659. min: 0,
  660. max: 100,
  661. title: {
  662. text: 'Percentage'
  663. }
  664. },
  665. tooltip: {
  666. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  667. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  668. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  669. footerFormat: '</table>',
  670. shared: true,
  671. useHTML: true
  672. },
  673. plotOptions: {
  674. bar: {
  675. //grouping: false,
  676. shadow: false,
  677. borderWidth: 0,
  678. },
  679. series: {
  680. pointPadding: 0,
  681. groupPadding: 0.075
  682. },
  683. },
  684. series: [{
  685. name: 'Expected Value',
  686. color: '#555555',
  687. dataLabels: {
  688. enabled: true,
  689. fontSize: 8,
  690. color: '#fff',
  691. align: 'right',
  692. format: '{y:.1f}%',
  693. style: {
  694. //fontWeight: 'bold'
  695. },
  696. y:-1
  697. },
  698. data: [
  699. @foreach($outcomes as $index => $outcome)
  700. @if(
  701. is_array($undergrad_outcomes_attempted)
  702. && array_key_exists($outcome->id, $undergrad_outcomes_attempted)
  703. && $undergrad_outcomes_attempted[$outcome->id]!=0)
  704. {{{ $outcome->expected_outcome }}},
  705. @else
  706. 0,
  707. @endif
  708. @endforeach
  709. ],
  710. pointPadding: 0,
  711. }, {
  712. name: 'Obtained Value',
  713. color: '#e70033',
  714. dataLabels: {
  715. enabled: true,
  716. fontSize: 8,
  717. color: '#fff',
  718. align: 'right',
  719. format: '{y:.1f}%',
  720. style: {
  721. //fontWeight: 'bold'
  722. },
  723. y:-1
  724. },
  725. data:[
  726. @foreach($outcomes as $index => $outcome)
  727. @if(
  728. is_array($undergrad_outcomes_attempted)
  729. && array_key_exists($outcome->id, $undergrad_outcomes_attempted)
  730. && $undergrad_outcomes_attempted[$outcome->id]!=0)
  731. {{{ ($undergrad_outcomes_achieved[$outcome->id]/$undergrad_outcomes_attempted[$outcome->id])*100 }}},
  732. @else
  733. 0,
  734. @endif
  735. @endforeach
  736. ],
  737. pointPadding: 0,
  738. }]
  739. });
  740. // Include dummy graph for outcomes
  741. @include('global.dummy-outcomes')
  742. });
  743. @stop