Nav apraksta

program.blade.php 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  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. <a href="{{ action('ProgramsController@studentsProgramAssessmentReportForProfessors', array($program->id)); }}" class="btn btn-primary pull-left" alt="print">Go to Performance by Program Students</a>
  15. <div class="row" id = "allGraph">
  16. <div class="col-md-12" id="graph"></div>
  17. </div>
  18. <div class="row graph-stu" id = "programGraph">
  19. <div class = "col-md-12" id="graph-stu-program"></div>
  20. </div>
  21. <div class="row">
  22. <div class="col-md-12">
  23. <h3>Contact Information</h3>
  24. </div>
  25. </div>
  26. <div class="row">
  27. <div class="col-md-6">
  28. <h4>School/College Coordinator(s)</h4>
  29. <table class="table table-striped">
  30. <thead>
  31. <tr>
  32. <th>Name</th>
  33. <th>Email</th>
  34. <th>Office Phone</th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. @foreach ($scoords as $scoord)
  39. <tr>
  40. <td>{{ $scoord->surnames }}, {{ $scoord->first_name }}</td>
  41. <td>
  42. <a href="mailto:{{ $scoord->email }}">{{ $scoord->email }}</a>
  43. </td>
  44. <td>
  45. @if($scoord->office_phone)
  46. {{{ $scoord->office_phone }}}
  47. @if($scoord->office_extension)
  48. <span>ext.</span> {{{ $scoord->office_extension }}}
  49. @endif
  50. @else
  51. Not set
  52. @endif
  53. </td>
  54. </tr>
  55. @endforeach
  56. </tbody>
  57. </table>
  58. </div>
  59. <div class="col-md-6">
  60. <h4>Program Coordinator(s)</h4>
  61. <table class="table table-striped">
  62. <thead>
  63. <tr>
  64. <th>Name</th>
  65. <th>Email</th>
  66. <th>Office Phone</th>
  67. </tr>
  68. </thead>
  69. <tbody>
  70. @foreach ($pcoords as $pcoord)
  71. <tr>
  72. <td>{{ $pcoord->surnames }}, {{ $pcoord->first_name }}</td>
  73. <td>
  74. <a href="mailto:{{ $pcoord->email }}">{{ $pcoord->email }}</a>
  75. </td>
  76. <td>
  77. @if($pcoord->office_phone)
  78. {{{ $pcoord->office_phone }}}
  79. @if($pcoord->office_extension)
  80. <span>ext.</span> {{{ $pcoord->office_extension }}}
  81. @endif
  82. @else
  83. Not set
  84. @endif
  85. </td>
  86. </tr>
  87. @endforeach
  88. </tbody>
  89. </table>
  90. </div>
  91. </div>
  92. <script>
  93. function changeView(graph_to_hide, graph_to_show, index, message){
  94. current_message = $("#change-view-btn"+index).html();
  95. $("#change-view-btn"+index).html(message);
  96. $(graph_to_hide).hide()
  97. $(graph_to_show).show()
  98. $("#change-view-btn"+index).attr('onclick','changeView("'+graph_to_show+'", "'+graph_to_hide+'","'+index+'","'+current_message+'")')
  99. }
  100. $(".graph-stu").hide();
  101. </script>
  102. @stop
  103. @section('included-js')
  104. <!-- HighCharts -->
  105. <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
  106. <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
  107. @stop
  108. @section('javascript')
  109. $(function () {
  110. $('#graph').highcharts({
  111. chart: {
  112. type: 'bar'
  113. },
  114. title: {
  115. text: 'Achieved vs Expected Learning Outcomes'
  116. },
  117. xAxis: {
  118. categories: [
  119. @foreach($outcomes as $outcome)
  120. "{{{ $outcome->name }}}<br> (N = {{$outcomes_attempted[$outcome->id]}}, {{$outcomes_achieved[$outcome->id]}})",
  121. @endforeach
  122. ],
  123. labels: {
  124. style: {
  125. fontSize:'11px'
  126. },
  127. step:1,
  128. useHTML:true,
  129. formatter: function() {
  130. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  131. },
  132. }
  133. },
  134. yAxis: {
  135. min: 0,
  136. max: 100,
  137. title: {
  138. text: 'Percentage'
  139. },@if($program->expected_outcome_target == null)
  140. plotLines:[{
  141. value:70.00,
  142. color: '#000',
  143. width:3,
  144. zIndex:4,
  145. label:{
  146. text: 'Goal (70.00%)',
  147. style: {
  148. color: '#000',
  149. fontSize: '14px',
  150. }
  151. }
  152. }]
  153. @else
  154. plotLines:[{
  155. value:{{$program->expected_outcome_target->expected_target}},
  156. color: '#000',
  157. width:3,
  158. zIndex:4,
  159. label:{
  160. text: 'Goal ({{$program->expected_outcome_target->expected_target}}%)',
  161. style: {
  162. color: '#000',
  163. fontSize: '14px',
  164. }
  165. }
  166. }]
  167. @endif
  168. },
  169. tooltip: {
  170. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  171. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  172. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  173. footerFormat: '</table>',
  174. shared: true,
  175. useHTML: true
  176. },
  177. plotOptions: {
  178. bar: {
  179. //grouping: false,
  180. shadow: false,
  181. borderWidth: 0,
  182. },
  183. series: {
  184. pointPadding: 0,
  185. groupPadding: 0.075
  186. },
  187. },
  188. series: [{
  189. name: 'Achieved',
  190. color: '#e70033',
  191. dataLabels: {
  192. enabled: true,
  193. fontSize: 8,
  194. color: '#fff',
  195. align: 'right',
  196. format: '{y:.1f}%',
  197. style: {
  198. //fontWeight: 'bold'
  199. },
  200. y:-1
  201. },
  202. data:[
  203. @foreach($outcomes as $index => $outcome)
  204. @if(
  205. is_array($outcomes_attempted)
  206. && array_key_exists($outcome->id, $outcomes_attempted)
  207. && $outcomes_attempted[$outcome->id]!=0)
  208. <?php
  209. if (isset($outcomes_achieved[$outcome->id])){
  210. $achieved = $outcomes_achieved[$outcome->id];
  211. }
  212. else $achieved = 0;
  213. ?>
  214. {{{ ($achieved/$outcomes_attempted[$outcome->id])*100 }}},
  215. @else
  216. 0,
  217. @endif
  218. @endforeach
  219. ],
  220. pointPadding: 0,
  221. } {{--, {
  222. name: 'Expected',
  223. color: '#555555',
  224. dataLabels: {
  225. enabled: true,
  226. fontSize: 8,
  227. color: '#fff',
  228. align: 'right',
  229. format: '{y:.1f}%',
  230. style: {
  231. //fontWeight: 'bold'
  232. },
  233. y:-1
  234. },
  235. data: [
  236. @foreach($outcomes as $index => $outcome)
  237. @if(
  238. is_array($outcomes_attempted)
  239. && array_key_exists($outcome->id, $outcomes_attempted)
  240. && $outcomes_attempted[$outcome->id]!=0)
  241. {{{ $outcome->expected_outcome }}},
  242. @else
  243. 0,
  244. @endif
  245. @endforeach
  246. ],
  247. pointPadding: 0,
  248. } --}}]
  249. });
  250. $('#graph-stu-program').highcharts({
  251. chart: {
  252. type: 'bar'
  253. },
  254. title: {
  255. text: 'Performance by Learning Outcome Criteria in Program\'s students'
  256. },
  257. legend: {
  258. reversed: true,
  259. },
  260. xAxis: {
  261. categories: [
  262. @foreach($outcomes as $outcome)
  263. "{{{ $outcome->name }}} <br>(N = {{$program_outcomes_attempted[$outcome->id]}}, {{$program_outcomes_achieved[$outcome->id]}})",
  264. @endforeach
  265. ],
  266. labels: {
  267. style: {
  268. fontSize:'11px'
  269. },
  270. step:1,
  271. useHTML:true,
  272. formatter: function() {
  273. return '<div style="width:100px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  274. },
  275. }
  276. },
  277. yAxis: {
  278. min: 0,
  279. max: 100,
  280. title: {
  281. text: 'Percentage'
  282. },
  283. @if($program->expected_outcome_target == null)
  284. plotLines:[{
  285. value:70.00,
  286. color: '#000',
  287. width:3,
  288. zIndex:4,
  289. label:{
  290. text: 'Goal (70.00%)',
  291. style: {
  292. color: '#000',
  293. fontSize: '14px',
  294. }
  295. }
  296. }]
  297. @else
  298. plotLines:[{
  299. value:{{$program->expected_outcome_target->expected_target}},
  300. color: '#000',
  301. width:3,
  302. zIndex:4,
  303. label:{
  304. text: 'Goal ({{$program->expected_outcome_target->expected_target}}%)',
  305. style: {
  306. color: '#000',
  307. fontSize: '14px',
  308. }
  309. }
  310. }]
  311. @endif
  312. },
  313. tooltip: {
  314. enabled:false
  315. },
  316. plotOptions: {
  317. bar: {
  318. //grouping: false,
  319. shadow: false,
  320. borderWidth: 0,
  321. },
  322. series: {
  323. pointPadding: 0,
  324. groupPadding: 0.075,
  325. animation: false
  326. },
  327. },
  328. series: [{
  329. name: 'Obtained Value',
  330. color: '#e70033',
  331. dataLabels: {
  332. enabled: true,
  333. fontSize: 8,
  334. color: '#fff',
  335. align: 'right',
  336. format: '{y:.1f}%',
  337. style: {
  338. //fontWeight: 'bold'
  339. },
  340. y:-1
  341. },
  342. data:[
  343. @foreach($outcomes as $index => $outcome)
  344. @if(
  345. is_array($program_outcomes_attempted)
  346. && array_key_exists($outcome->id, $program_outcomes_attempted)
  347. && $program_outcomes_attempted[$outcome->id]!=0)
  348. {{{ ($program_outcomes_achieved[$outcome->id]/$program_outcomes_attempted[$outcome->id])*100 }}},
  349. @else
  350. 0,
  351. @endif
  352. @endforeach
  353. ]
  354. }]
  355. });
  356. // Include dummy graph for outcomes
  357. @include('global.dummy-outcomes')
  358. });
  359. @stop