No Description

overview.blade.php 29KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  1. @extends('layouts.master')
  2. @section('navigation')
  3. @include('local.managers.pCoords._new_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. <div class="btn-group pull-right">
  21. <a href="{{ action('ProgramsController@print_program', array($program_item['program']->id)); }}" class="btn btn-primary" alt="print"><span class="glyphicon glyphicon-print"></span></a>
  22. <button type='button' class = 'btn btn-primary' id="change-view-btn{{$index}}" onclick="changeView('#allGraph{{$index}}','#programGraph{{$index}}', {{$index}}, 'Show Program Courses')">Show Program Students</button>
  23. </div>
  24. <br>
  25. <br>
  26. <div class = 'row'>
  27. <div class ='col-md-12'>
  28. @if($program_item['linea_de_graph']== null)
  29. <p><strong>This Goal Bar is the default score. If you wish to change it, change it on the selected Semesters Annual Plan</strong></p>
  30. @else
  31. <p><strong>This Goal is from {{$program_item['linea_de_graph']->program_name}} on the semester {{$program_item['linea_de_graph']->semester_name}}</strong></p>
  32. @endif
  33. </div>
  34. </div>
  35. <div class="row" id = 'allGraph{{$index}}'>
  36. <div class="col-md-12 graph" id="graph{{ $index }}"></div>
  37. </div>
  38. <div class ='row graph-stu' id = "programGraph{{$index}}">
  39. <div class="col-md-12 graph " id = "graph-stu-program{{$index}}"></div>
  40. </div>
  41. <!-- ===== sub tabs ===== -->
  42. <div>
  43. <!-- Sub nav tabs -->
  44. <ul id="programSubTabs{{ $index }}" class="nav nav-tabs" role="tablist">
  45. <li role="presentation" class="active"><a href="#courses{{ $index }}" aria-controls="courses" role="tab">Courses</a></li>
  46. <li role="presentation"><a href="#sections{{ $index }}" aria-controls="sections" role="tab">Sections</a></li>
  47. <li role="presentation">
  48. <a href="#contact{{ $index }}" aria-controls="contact" role="tab">Contact Information</a>
  49. </li>
  50. </ul>
  51. <!-- Sub tab panes -->
  52. <div class="tab-content">
  53. <div role="tabpanel" class="tab-pane active" id="courses{{ $index }}">
  54. <div class="row">
  55. <div class="col-md-12">
  56. <h3>Courses in this program</h3>
  57. <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>
  58. @if($program_item['program_courses']->count()>0)
  59. <table class="table table-striped table-condensed datatable">
  60. <thead>
  61. <tr>
  62. <th>Identifier</th>
  63. <th>Name</th>
  64. <th>Program</th>
  65. <th>Assessed and Published</th>
  66. </tr>
  67. </thead>
  68. <tfoot>
  69. <tr class="column-search">
  70. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  71. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  72. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  73. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  74. </tr>
  75. </tfoot>
  76. <tbody>
  77. @foreach($program_item['grouped_courses'] as $grouped_course)
  78. <tr>
  79. <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>
  80. <td class="col-md-3">{{{ $grouped_course->name}}}</td>
  81. <td class="col-md-3">{{{ $grouped_course->program->name }}}</td>
  82. <td class="col-md-2">
  83. @if($grouped_course->someSectionAssessed()!=0)
  84. Yes
  85. @else
  86. No
  87. @endif
  88. </td>
  89. </tr>
  90. @endforeach
  91. </tbody>
  92. </table>
  93. @else
  94. <p class="lead"> No courses assigned.</p>
  95. @endif
  96. </div>
  97. </div>
  98. </div>
  99. <div role="tabpanel" class="tab-pane" id="sections{{ $index }}">
  100. <div class="row">
  101. <div class="col-md-12">
  102. <h3>Sections in this program</h3>
  103. @if($program_item['program_courses']->count()>0)
  104. <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>
  105. <p>Note that some courses may have assessed activities but unpublished results. Unplublished results are <strong>not considered</strong>.</p>
  106. <table class="table table-striped table-condensed datatable">
  107. <thead>
  108. <tr>
  109. <th>Identifier</th>
  110. <th>Name</th>
  111. <th>Professor</th>
  112. <th>Assessed Activities</th>
  113. <th>Published Results</th>
  114. </tr>
  115. </thead>
  116. <tfoot>
  117. <tr class="column-search">
  118. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  119. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  120. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  121. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  122. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  123. </tr>
  124. </tfoot>
  125. <tbody>
  126. @foreach($program_item['program_courses'] as $course)
  127. <tr>
  128. <td>{{ HTML::linkAction('CoursesController@showLimited', $course->code.$course->number.'-'.$course->section.' ('.$course->semester->code.')', array('id'=>$course->id)) }}</td>
  129. <td>{{{ $course->name}}}</td>
  130. <td>{{{ $course->user->surnames }}}, {{{ $course->user->first_name }}}</td>
  131. <td>
  132. @if(count($course->assessedActivities))
  133. Yes
  134. @else
  135. No
  136. @endif
  137. </td>
  138. <td>
  139. @if(count($course->publishedActivities))
  140. Yes
  141. @else
  142. No
  143. @endif
  144. </td>
  145. </tr>
  146. @endforeach
  147. </tbody>
  148. </table>
  149. @else
  150. <p class="lead"> No sections assigned.</p>
  151. @endif
  152. </div>
  153. </div>
  154. </div>
  155. <div role="tabpanel" class="tab-pane" id="contact{{ $index }}">
  156. <div class="row">
  157. <div class="col-md-12">
  158. <h3>Contact information</h3>
  159. <table class="table table-striped datatable">
  160. <thead>
  161. <tr>
  162. <th>Name</th>
  163. <th>Role</th>
  164. <th>Program(s)</th>
  165. <th>Email</th>
  166. <th>Office Phone</th>
  167. <th>Cell Phone</th>
  168. </tr>
  169. </thead>
  170. <tfoot>
  171. <tr class="column-search">
  172. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  173. <th><select class="column-search-select form-control"><option value=""></option></select></th>
  174. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  175. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  176. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  177. <th><input class="column-search-bar form-control" type="text" placeholder="Search"/></th>
  178. </tr>
  179. </tfoot>
  180. <tbody>
  181. @foreach($programs_contact[$index] as $user)
  182. <tr>
  183. <td>{{ $user->surnames }}, {{ $user->first_name }}</td>
  184. @if($user->role == 1)
  185. <td>Administrator</td>
  186. <td>All</td>
  187. @elseif($user->role == 2)
  188. <td>School Coordinator</td>
  189. <td>All in {{ $program_item['program']->school }}</td>
  190. @elseif($user->role == 3)
  191. <td>Program Coordinator</td>
  192. <td>
  193. @foreach ($user->programs as $program)
  194. <p>{{ $program->name }}</p>
  195. @endforeach
  196. </td>
  197. @else
  198. <td>Professor</td>
  199. <td>
  200. @foreach ($user->programs as $program)
  201. <p>{{ $program->name }}</p>
  202. @endforeach
  203. </td>
  204. @endif
  205. <td>
  206. <a href="mailto:{{ $user->email }}">{{ $user->email }}</a>
  207. </td>
  208. <td>
  209. @if($user->office_phone)
  210. {{{ $user->office_phone }}}
  211. @if($user->office_extension)
  212. <span>ext.</span> {{{ $user->office_extension }}}
  213. @endif
  214. @else
  215. Not set
  216. @endif
  217. </td>
  218. <td>
  219. @if($user->cell_phone)
  220. {{{ $user->cell_phone }}}
  221. @else
  222. Not set
  223. @endif
  224. </td>
  225. </tr>
  226. @endforeach
  227. </tbody>
  228. </table>
  229. </div>
  230. </div>
  231. </div>
  232. </div>
  233. </div>
  234. <!-- ===== end sub tabs ===== -->
  235. </div>
  236. @endforeach
  237. </div>
  238. <script>
  239. function changeView(graph_to_hide, graph_to_show, index, message){
  240. current_message = $("#change-view-btn"+index).html();
  241. $("#change-view-btn"+index).html(message);
  242. $(graph_to_hide).hide()
  243. $(graph_to_show).show()
  244. $("#change-view-btn"+index).attr('onclick','changeView("'+graph_to_show+'", "'+graph_to_hide+'",'+index+',"'+current_message+'")')
  245. }
  246. $(".graph-stu").hide();
  247. </script>
  248. @stop
  249. @section('included-js')
  250. <!-- HighCharts -->
  251. <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
  252. <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
  253. <!-- Datatables -->
  254. @include('global._datatables_js')
  255. @stop
  256. @section('javascript')
  257. // Create an function that responds to click of program tabs
  258. @foreach($programs_array as $index => $program_item)
  259. $('#programTabs a').click(function (e) {
  260. e.preventDefault()
  261. $(this).tab('show');
  262. $('#programSubTabs{{$index}} a').click(function (e) {
  263. e.preventDefault()
  264. $(this).tab('show');
  265. });
  266. $('#graph{{$index}}').highcharts({
  267. chart: {
  268. type: 'bar'
  269. },
  270. title: {
  271. text: 'Performance by Learning Outcome Criteria in {{ $program_item['program']->name }} Courses'
  272. },
  273. legend: {
  274. reversed: true,
  275. },
  276. xAxis: {
  277. categories: [
  278. @foreach($outcomes as $outcome)
  279. @if(is_array($program_item['outcomes_attempted'])
  280. && array_key_exists($outcome->id, $program_item['outcomes_attempted'])
  281. && array_key_exists($outcome->id, $program_item['outcomes_achieved'])
  282. && $program_item['outcomes_attempted'][$outcome->id]!=0)
  283. "{{{ $outcome->name }}}<br> (N = {{$program_item['outcomes_attempted'][$outcome->id]}}, {{$program_item['outcomes_achieved'][$outcome->id]}})",
  284. @else
  285. "{{$outcome->name}}<br> (N = 0, 0)",
  286. @endif
  287. @endforeach
  288. ],
  289. labels: {
  290. style: {
  291. fontSize:'11px'
  292. },
  293. step:1,
  294. useHTML:true,
  295. formatter: function() {
  296. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  297. },
  298. }
  299. },
  300. yAxis: {
  301. min: 0,
  302. max: 100,
  303. title: {
  304. text: 'Percentage'
  305. },
  306. plotLines:[{
  307. @if($program_item['linea_de_graph'] != null)
  308. value:{{$program_item['linea_de_graph']->expected_target}},
  309. color: '#000',
  310. width:3,
  311. zIndex:4,
  312. label:{
  313. text: 'Goal ({{$program_item['linea_de_graph']->expected_target}}%)',
  314. @else
  315. value:70.00,
  316. color: '#000',
  317. width:3,
  318. zIndex:4,
  319. label:{
  320. text: 'Goal (70.00%)',
  321. @endif
  322. style: {
  323. color: '#000',
  324. fontSize: '14px',
  325. }
  326. }
  327. }]
  328. },
  329. tooltip: {
  330. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  331. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  332. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  333. footerFormat: '</table>',
  334. shared: true,
  335. useHTML: true
  336. },
  337. plotOptions: {
  338. bar: {
  339. //grouping: false,
  340. shadow: false,
  341. borderWidth: 0,
  342. },
  343. series: {
  344. pointPadding: 0,
  345. groupPadding: 0.075
  346. },
  347. },
  348. series: [{{--{
  349. name: 'Expected Value',
  350. color: '#555555',
  351. dataLabels: {
  352. enabled: true,
  353. fontSize: 8,
  354. color: '#fff',
  355. align: 'right',
  356. format: '{y:.1f}%',
  357. style: {
  358. //fontWeight: 'bold'
  359. },
  360. y:-1
  361. },
  362. data: [
  363. @foreach($outcomes as $index => $outcome)
  364. @if(
  365. is_array($program_item['outcomes_attempted'])
  366. && array_key_exists($outcome->id, $program_item['outcomes_attempted'])
  367. && $program_item['outcomes_attempted'][$outcome->id]!=0)
  368. {{{ $outcome->expected_outcome }}},
  369. @else
  370. 0,
  371. @endif
  372. @endforeach
  373. ]
  374. },--}}{
  375. name: 'Obtained Value',
  376. color: '#e70033',
  377. dataLabels: {
  378. enabled: true,
  379. fontSize: 8,
  380. color: '#fff',
  381. align: 'right',
  382. format: '{y:.1f}%',
  383. style: {
  384. //fontWeight: 'bold'
  385. },
  386. y:-1
  387. },
  388. data:[
  389. @foreach($outcomes as $index2 => $outcome)
  390. @if(
  391. is_array($program_item['outcomes_attempted'])
  392. && array_key_exists($outcome->id, $program_item['outcomes_attempted'])
  393. && array_key_exists($outcome->id, $program_item['outcomes_achieved'])
  394. && $program_item['outcomes_attempted'][$outcome->id]!=0)
  395. {{{ ($program_item['outcomes_achieved'][$outcome->id]/$program_item['outcomes_attempted'][$outcome->id])*100 }}},
  396. @else
  397. 0,
  398. @endif
  399. @endforeach
  400. ]
  401. }]
  402. });
  403. $('#graph-stu-program{{$index}}').highcharts({
  404. chart: {
  405. type: 'bar'
  406. },
  407. title: {
  408. text: 'Performance by {{ $program_item['program']->name }}\'s Students in Learning Outcomes'
  409. },
  410. legend: {
  411. reversed: true,
  412. },
  413. xAxis: {
  414. categories: [
  415. @foreach($outcomes as $outcome)
  416. @if(is_array($program_item['program_outcomes_attempted'])
  417. && array_key_exists($outcome->id, $program_item['program_outcomes_attempted'])
  418. && array_key_exists($outcome->id, $program_item['program_outcomes_achieved'])
  419. && $program_item['program_outcomes_attempted'][$outcome->id]!=0)
  420. "{{{ $outcome->name }}}<br> (N = {{$program_item['program_outcomes_attempted'][$outcome->id]}}, {{$program_item['program_outcomes_achieved'][$outcome->id]}})",
  421. @else
  422. "{{$outcome->name}}<br> (N = 0, 0)",
  423. @endif
  424. @endforeach
  425. ],
  426. labels: {
  427. style: {
  428. fontSize:'11px'
  429. },
  430. step:1,
  431. useHTML:true,
  432. formatter: function() {
  433. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  434. },
  435. }
  436. },
  437. yAxis: {
  438. min: 0,
  439. max: 100,
  440. title: {
  441. text: 'Percentage'
  442. },
  443. plotLines:[{
  444. @if($program_item['linea_de_graph'] != null)
  445. value:{{$program_item['linea_de_graph']->expected_target}},
  446. color: '#000',
  447. width:3,
  448. zIndex:4,
  449. label:{
  450. text: 'Goal ({{$program_item['linea_de_graph']->expected_target}}%)',
  451. @else
  452. value:70.00,
  453. color: '#000',
  454. width:3,
  455. zIndex:4,
  456. label:{
  457. text: 'Goal (70.00%)',
  458. @endif
  459. style: {
  460. color: '#000',
  461. fontSize: '14px',
  462. }
  463. }
  464. }]
  465. },
  466. tooltip: {
  467. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  468. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  469. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  470. footerFormat: '</table>',
  471. shared: true,
  472. useHTML: true
  473. },
  474. plotOptions: {
  475. bar: {
  476. //grouping: false,
  477. shadow: false,
  478. borderWidth: 0,
  479. },
  480. series: {
  481. pointPadding: 0,
  482. groupPadding: 0.075
  483. },
  484. },
  485. series: [{{--{
  486. name: 'Expected Value',
  487. color: '#555555',
  488. dataLabels: {
  489. enabled: true,
  490. fontSize: 8,
  491. color: '#fff',
  492. align: 'right',
  493. format: '{y:.1f}%',
  494. style: {
  495. //fontWeight: 'bold'
  496. },
  497. y:-1
  498. },
  499. data: [
  500. @foreach($outcomes as $index => $outcome)
  501. @if(
  502. is_array($program_item['outcomes_attempted'])
  503. && array_key_exists($outcome->id, $program_item['outcomes_attempted'])
  504. && $program_item['outcomes_attempted'][$outcome->id]!=0)
  505. {{{ $outcome->expected_outcome }}},
  506. @else
  507. 0,
  508. @endif
  509. @endforeach
  510. ]
  511. },--}}{
  512. name: 'Obtained Value',
  513. color: '#e70033',
  514. dataLabels: {
  515. enabled: true,
  516. fontSize: 8,
  517. color: '#fff',
  518. align: 'right',
  519. format: '{y:.1f}%',
  520. style: {
  521. //fontWeight: 'bold'
  522. },
  523. y:-1
  524. },
  525. data:[
  526. @foreach($outcomes as $index => $outcome)
  527. @if(
  528. is_array($program_item['program_outcomes_attempted'])
  529. && array_key_exists($outcome->id, $program_item['program_outcomes_attempted'])
  530. && array_key_exists($outcome->id, $program_item['program_outcomes_achieved'])
  531. && $program_item['program_outcomes_attempted'][$outcome->id]!=0)
  532. {{{ ($program_item['program_outcomes_achieved'][$outcome->id]/$program_item['program_outcomes_attempted'][$outcome->id])*100 }}},
  533. @else
  534. 0,
  535. @endif
  536. @endforeach
  537. ]
  538. }]
  539. });
  540. });
  541. @endforeach
  542. // Trigger click on first tab so it loads automatically
  543. $( '#programTabs a:eq(0)').trigger('click');
  544. // Include dummy graph for outcomes
  545. @include('global.dummy-outcomes')
  546. @stop