No Description

overview.blade.php 21KB

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