No Description

school.blade.php 39KB

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