暫無描述

program.blade.php 13KB

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