No Description

overview.blade.php 29KB

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