No Description

program.blade.php 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  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. @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 }}}, <br> (N = {{$outcomes_attempted[$outcome->id]}} ,{{$outcomes_achieved[$outcome->id]}})",
  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. @if($program->expected_outcome_target == null)
  246. plotLines:[{
  247. value:70,
  248. color: '#000',
  249. width:3,
  250. zIndex:4,
  251. label:{
  252. text: 'Goal (70%)',
  253. style: {
  254. color: '#000',
  255. fontSize: '14px',
  256. }
  257. }
  258. }]
  259. @else
  260. plotLines:[{
  261. value:{{$program->expected_outcome_target->expected_target}},
  262. color: '#000',
  263. width:3,
  264. zIndex:4,
  265. label:{
  266. text: 'Goal ({{$program->expected_outcome_target->expected_target}}%)',
  267. style: {
  268. color: '#000',
  269. fontSize: '14px',
  270. }
  271. }
  272. }]
  273. @endif
  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. data: [
  309. @foreach($outcomes as $index => $outcome)
  310. @if(
  311. is_array($outcomes_attempted)
  312. && array_key_exists($outcome->id, $outcomes_attempted)
  313. && $outcomes_attempted[$outcome->id]!=0)
  314. {{{ $outcome->expected_outcome }}},
  315. @else
  316. 0,
  317. @endif
  318. @endforeach
  319. ]
  320. },*/{
  321. name: 'Obtained Value',
  322. color: '#e70033',
  323. dataLabels: {
  324. enabled: true,
  325. fontSize: 8,
  326. color: '#fff',
  327. align: 'right',
  328. format: '{y:.1f}%',
  329. style: {
  330. //fontWeight: 'bold'
  331. },
  332. y:-1
  333. },
  334. data:[
  335. @foreach($outcomes as $index => $outcome)
  336. @if(
  337. is_array($outcomes_attempted)
  338. && array_key_exists($outcome->id, $outcomes_attempted)
  339. && $outcomes_attempted[$outcome->id]!=0)
  340. {{{ ($outcomes_achieved[$outcome->id]/$outcomes_attempted[$outcome->id])*100 }}},
  341. @else
  342. 0,
  343. @endif
  344. @endforeach
  345. ]
  346. }]
  347. });
  348. // Include dummy graph for outcomes
  349. @include('global.dummy-outcomes')
  350. @stop