Ei kuvausta

program.blade.php 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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. @elseif($role==3)
  8. @include('local.managers.pCoords._navigation')
  9. @else
  10. @include('local.professors._navigation')
  11. @endif
  12. @stop
  13. @section('main')
  14. <div class="row">
  15. <div class="col-md-12" id="graph"></div>
  16. </div>
  17. <div class="row">
  18. <div class="col-md-12">
  19. <h3>Contact Information</h3>
  20. </div>
  21. </div>
  22. <div class="row">
  23. <div class="col-md-6">
  24. <h4>School/College Coordinator(s)</h4>
  25. <table class="table table-striped">
  26. <thead>
  27. <tr>
  28. <th>Name</th>
  29. <th>Email</th>
  30. <th>Office Phone</th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. @foreach ($scoords as $scoord)
  35. <tr>
  36. <td>{{ $scoord->surnames }}, {{ $scoord->first_name }}</td>
  37. <td>
  38. <a href="mailto:{{ $scoord->email }}">{{ $scoord->email }}</a>
  39. </td>
  40. <td>
  41. @if($scoord->office_phone)
  42. {{{ $scoord->office_phone }}}
  43. @if($scoord->office_extension)
  44. <span>ext.</span> {{{ $scoord->office_extension }}}
  45. @endif
  46. @else
  47. Not set
  48. @endif
  49. </td>
  50. </tr>
  51. @endforeach
  52. </tbody>
  53. </table>
  54. </div>
  55. <div class="col-md-6">
  56. <h4>Program Coordinator(s)</h4>
  57. <table class="table table-striped">
  58. <thead>
  59. <tr>
  60. <th>Name</th>
  61. <th>Email</th>
  62. <th>Office Phone</th>
  63. </tr>
  64. </thead>
  65. <tbody>
  66. @foreach ($pcoords as $pcoord)
  67. <tr>
  68. <td>{{ $pcoord->surnames }}, {{ $pcoord->first_name }}</td>
  69. <td>
  70. <a href="mailto:{{ $pcoord->email }}">{{ $pcoord->email }}</a>
  71. </td>
  72. <td>
  73. @if($pcoord->office_phone)
  74. {{{ $pcoord->office_phone }}}
  75. @if($pcoord->office_extension)
  76. <span>ext.</span> {{{ $pcoord->office_extension }}}
  77. @endif
  78. @else
  79. Not set
  80. @endif
  81. </td>
  82. </tr>
  83. @endforeach
  84. </tbody>
  85. </table>
  86. </div>
  87. </div>
  88. @stop
  89. @section('included-js')
  90. <!-- HighCharts -->
  91. <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
  92. <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
  93. @stop
  94. @section('javascript')
  95. $(function () {
  96. $('#graph').highcharts({
  97. chart: {
  98. type: 'bar'
  99. },
  100. title: {
  101. text: 'Achieved vs Expected Learning Outcomes'
  102. },
  103. xAxis: {
  104. categories: [
  105. @foreach($outcomes as $outcome)
  106. "{{{ $outcome->name }}}",
  107. @endforeach
  108. ],
  109. labels: {
  110. style: {
  111. fontSize:'11px'
  112. },
  113. step:1,
  114. useHTML:true,
  115. formatter: function() {
  116. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  117. },
  118. }
  119. },
  120. yAxis: {
  121. min: 0,
  122. max: 100,
  123. title: {
  124. text: 'Percentage'
  125. }
  126. },
  127. tooltip: {
  128. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  129. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  130. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  131. footerFormat: '</table>',
  132. shared: true,
  133. useHTML: true
  134. },
  135. plotOptions: {
  136. bar: {
  137. //grouping: false,
  138. shadow: false,
  139. borderWidth: 0,
  140. },
  141. series: {
  142. pointPadding: 0,
  143. groupPadding: 0.075
  144. },
  145. },
  146. series: [{
  147. name: 'Achieved',
  148. color: '#e70033',
  149. dataLabels: {
  150. enabled: true,
  151. fontSize: 8,
  152. color: '#fff',
  153. align: 'right',
  154. format: '{y:.1f}%',
  155. style: {
  156. //fontWeight: 'bold'
  157. },
  158. y:-1
  159. },
  160. data:[
  161. @foreach($outcomes as $index => $outcome)
  162. @if(
  163. is_array($outcomes_attempted)
  164. && array_key_exists($outcome->id, $outcomes_attempted)
  165. && $outcomes_attempted[$outcome->id]!=0)
  166. {{{ ($outcomes_achieved[$outcome->id]/$outcomes_attempted[$outcome->id])*100 }}},
  167. @else
  168. 0,
  169. @endif
  170. @endforeach
  171. ],
  172. pointPadding: 0,
  173. }, {
  174. name: 'Expected',
  175. color: '#555555',
  176. dataLabels: {
  177. enabled: true,
  178. fontSize: 8,
  179. color: '#fff',
  180. align: 'right',
  181. format: '{y:.1f}%',
  182. style: {
  183. //fontWeight: 'bold'
  184. },
  185. y:-1
  186. },
  187. data: [
  188. @foreach($outcomes as $index => $outcome)
  189. @if(
  190. is_array($outcomes_attempted)
  191. && array_key_exists($outcome->id, $outcomes_attempted)
  192. && $outcomes_attempted[$outcome->id]!=0)
  193. {{{ $outcome->expected_outcome }}},
  194. @else
  195. 0,
  196. @endif
  197. @endforeach
  198. ],
  199. pointPadding: 0,
  200. }]
  201. });
  202. // Include dummy graph for outcomes
  203. @include('global.dummy-outcomes')
  204. });
  205. @stop