説明なし

program.blade.php 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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. @endif
  10. @stop
  11. @section('main')
  12. <a href="{{ action('ProgramsController@print_program', array($program->id)); }}" class="btn btn-primary pull-right" alt="print"><span class="glyphicon glyphicon-print"></span></a>
  13. <br>
  14. <br>
  15. <div class="row">
  16. <div class="col-md-12" id="graph"></div>
  17. </div>
  18. <!-- =================== tabs =================== -->
  19. <div class="row">
  20. <!-- Nav tabs -->
  21. <ul id="programTabs" class="nav nav-tabs" role="tablist">
  22. <li role="presentation" class="active"><a href="#courses" aria-controls="courses" role="tab">Courses</a></li>
  23. <li role="presentation"><a href="#sections" aria-controls="sections" role="tab">Sections</a></li>
  24. <li role="presentation"><a href="#contact" aria-controls="contact" role="tab">Contact Information</a></li>
  25. </ul>
  26. <!-- Tab panes -->
  27. <div class="tab-content">
  28. <div role="tabpanel" class="tab-pane active" id="courses">
  29. <div class="row">
  30. <div class="col-md-12">
  31. <h3>Courses in this program</h3>
  32. @if($program_courses->count()>0)
  33. <table class="table table-striped table-condensed datatable">
  34. <thead>
  35. <tr>
  36. <th>Identifier</th>
  37. <th>Name</th>
  38. <th>Program</th>
  39. <th>Assessed</th>
  40. </tr>
  41. </thead>
  42. <tfoot>
  43. <tr class="column-search">
  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($grouped_courses as $grouped_course)
  52. <tr>
  53. <td class="col-md-1">{{ 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>
  54. <td class="col-md-4">{{{ $grouped_course->name}}}</td>
  55. <td class="col-md-3">{{{ $grouped_course->program->name }}}</td>
  56. <td class="col-md-1">
  57. @if($grouped_course->outcomes_attempted!=NULL)
  58. Yes
  59. @else
  60. No
  61. @endif
  62. </td>
  63. </tr>
  64. @endforeach
  65. </tbody>
  66. </table>
  67. @else
  68. <p class="lead"> No courses assigned.</p>
  69. @endif
  70. </div>
  71. </div>
  72. </div>
  73. <div role="tabpanel" class="tab-pane" id="sections">
  74. <div class="row">
  75. <div class="col-md-12">
  76. <h3>Sections in this program</h3>
  77. @if($program_courses->count()>0)
  78. <p class="lead"> {{{ $assessed_courses_count }}} out of {{{ $program_courses->count() }}} section(s) doing Assessment ({{{ round($assessed_courses_count/$program_courses->count()*100, 2) }}}%)</p>
  79. <table class="table table-striped table-condensed datatable">
  80. <thead>
  81. <tr>
  82. <th>Identifier</th>
  83. <th>Name</th>
  84. <th>Professor</th>
  85. <th>Assessed</th>
  86. </tr>
  87. </thead>
  88. <tfoot>
  89. <tr class="column-search">
  90. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  91. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  92. <th><input class="column-search-bar form-control" type="text" placeholder="Buscar"/></th>
  93. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  94. </tr>
  95. </tfoot>
  96. <tbody>
  97. @foreach($program_courses as $course)
  98. <tr>
  99. <td>{{ HTML::linkAction('CoursesController@showLimited', $course->code.$course->number.'-'.$course->section.' ('.$course->semester->code.')', array('id'=>$course->id)) }}</td>
  100. <td>{{{ $course->name}}}</td>
  101. <td>{{{ $course->user->surnames }}}, {{{ $course->user->first_name }}}</td>
  102. <td>
  103. @if($course->outcomes_attempted!=NULL)
  104. Yes
  105. @else
  106. No
  107. @endif
  108. </td>
  109. </tr>
  110. @endforeach
  111. </tbody>
  112. </table>
  113. @else
  114. <p class="lead"> No sections assigned.</p>
  115. @endif
  116. </div>
  117. </div>
  118. </div>
  119. <div role="tabpanel" class="tab-pane" id="contact">
  120. <div class="row">
  121. <div class="col-md-12">
  122. <h3>Contact Information</h3>
  123. <table class="table table-striped datatable">
  124. <thead>
  125. <tr>
  126. <th>Name</th>
  127. <th>Role</th>
  128. <th>Program</th>
  129. <th>Email</th>
  130. <th>Office Phone</th>
  131. </tr>
  132. </thead>
  133. <tfoot>
  134. <tr class="column-search">
  135. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  136. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  137. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  138. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  139. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  140. </tr>
  141. </tfoot>
  142. <tbody>
  143. @foreach($users as $user)
  144. <tr>
  145. <td>{{ $user->surnames }}, {{ $user->first_name }}</td>
  146. @if($user->role == 1)
  147. <td>Administrator</td>
  148. <td>All</td>
  149. @elseif($user->role == 2)
  150. <td>School Coordinator</td>
  151. <td>All in {{ $program->school->name }}</td>
  152. @elseif($user->role == 3)
  153. <td>Program Coordinator</td>
  154. <td>
  155. @foreach ($user->programs as $program)
  156. {{ $program->name }}&nbsp;
  157. @endforeach
  158. </td>
  159. @else
  160. <td>Professor</td>
  161. <td>
  162. @foreach ($user->programs as $program)
  163. {{ $program->name }}&nbsp;
  164. @endforeach
  165. </td>
  166. @endif
  167. <td>
  168. <a href="mailto:{{ $user->email }}">{{ $user->email }}</a>
  169. </td>
  170. <td>
  171. @if($user->office_phone)
  172. {{{ $user->office_phone }}}
  173. @if($user->office_extension)
  174. <span>ext.</span> {{{ $user->office_extension }}}
  175. @endif
  176. @else
  177. Not set
  178. @endif
  179. </td>
  180. </tr>
  181. @endforeach
  182. </tbody>
  183. </table>
  184. </div>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. <!-- =================== end tabs =================== -->
  190. @stop
  191. @section('included-js')
  192. <!-- HighCharts -->
  193. <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
  194. <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
  195. <!-- Datatables -->
  196. @include('global._datatables_js')
  197. @stop
  198. @section('javascript')
  199. $('#programTabs a').click(function (e) {
  200. e.preventDefault()
  201. $(this).tab('show');
  202. });
  203. $('#graph').highcharts({
  204. chart: {
  205. type: 'bar'
  206. },
  207. title: {
  208. text: 'Performance by Learning Outcome Criteria in {{ $program->name }} Program'
  209. },
  210. legend: {
  211. reversed: true,
  212. },
  213. xAxis: {
  214. categories: [
  215. @foreach($outcomes as $outcome)
  216. "{{{ $outcome->name }}}",
  217. @endforeach
  218. ],
  219. labels: {
  220. style: {
  221. fontSize:'11px'
  222. },
  223. step:1,
  224. useHTML:true,
  225. formatter: function() {
  226. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  227. },
  228. }
  229. },
  230. yAxis: {
  231. min: 0,
  232. max: 100,
  233. title: {
  234. text: 'Percentage'
  235. }
  236. },
  237. tooltip: {
  238. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  239. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  240. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  241. footerFormat: '</table>',
  242. shared: true,
  243. useHTML: true
  244. },
  245. plotOptions: {
  246. bar: {
  247. //grouping: false,
  248. shadow: false,
  249. borderWidth: 0,
  250. },
  251. series: {
  252. pointPadding: 0,
  253. groupPadding: 0.075
  254. },
  255. },
  256. series: [{
  257. name: 'Expected Value',
  258. color: '#555555',
  259. dataLabels: {
  260. enabled: true,
  261. fontSize: 8,
  262. color: '#fff',
  263. align: 'right',
  264. format: '{y:.1f}%',
  265. style: {
  266. //fontWeight: 'bold'
  267. },
  268. y:-1
  269. },
  270. data: [
  271. @foreach($outcomes as $index => $outcome)
  272. @if(
  273. is_array($outcomes_attempted)
  274. && array_key_exists($outcome->id, $outcomes_attempted)
  275. && $outcomes_attempted[$outcome->id]!=0)
  276. {{{ $outcome->expected_outcome }}},
  277. @else
  278. 0,
  279. @endif
  280. @endforeach
  281. ]
  282. },{
  283. name: 'Obtained Value',
  284. color: '#e70033',
  285. dataLabels: {
  286. enabled: true,
  287. fontSize: 8,
  288. color: '#fff',
  289. align: 'right',
  290. format: '{y:.1f}%',
  291. style: {
  292. //fontWeight: 'bold'
  293. },
  294. y:-1
  295. },
  296. data:[
  297. @foreach($outcomes as $index => $outcome)
  298. @if(
  299. is_array($outcomes_attempted)
  300. && array_key_exists($outcome->id, $outcomes_attempted)
  301. && $outcomes_attempted[$outcome->id]!=0)
  302. {{{ ($outcomes_achieved[$outcome->id]/$outcomes_attempted[$outcome->id])*100 }}},
  303. @else
  304. 0,
  305. @endif
  306. @endforeach
  307. ]
  308. }]
  309. });
  310. // Include dummy graph for outcomes
  311. @include('global.dummy-outcomes')
  312. @stop