설명 없음

program.blade.php 12KB

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