Aucune description

limited-course.blade.php 9.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  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. <div class="row">
  13. <div class="col-md-12">
  14. <p>{{$course->name}}</p>
  15. </div>
  16. </div>
  17. <div class = 'row'>
  18. <div class ='col-md-12'>
  19. @if($course->program->expected_outcome_target== null)
  20. <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>
  21. @else
  22. <p><strong>This Goal is from {{$course->program->name}} on the semester {{$course->program->expected_outcome_target->semester_name}}</strong></p>
  23. @endif
  24. </div>
  25. <div class="row">
  26. <div class="col-md-12" id="graph">
  27. </div>
  28. </div>
  29. <div class="row">
  30. <div class="col-md-5">
  31. <h4>Section Information</h4>
  32. <table class="table table-striped table-condensed">
  33. <tbody>
  34. <tr>
  35. <td>Professor</td>
  36. <td>{{{ $course->user->surnames }}}, {{{ $course->user->first_name }}}</td>
  37. </tr>
  38. <tr>
  39. <td>School</td>
  40. <td>{{{ $course->program->school->name }}}</td>
  41. </tr>
  42. <tr>
  43. <td>Program</td>
  44. <td>{{{ $course->program->name }}}</td>
  45. </tr>
  46. <tr>
  47. <td>Activities</td>
  48. <td> {{{ $course->activities->count() }}}</td>
  49. </tr>
  50. <tr>
  51. <td>Students</td>
  52. <td>{{{ $course->students->count() }}}</td>
  53. </tr>
  54. </tbody>
  55. </table>
  56. <h4>Students</h4>
  57. @if(!$students->isEmpty())
  58. <table class="table table-striped table-condensed">
  59. <thead><tr>
  60. <th></th>
  61. <th>Name</th>
  62. <th>Number</th>
  63. <th>School</th>
  64. <th>Major</th>
  65. </tr></thead>
  66. <tbdody>
  67. @foreach ($students as $i => $student)
  68. <?php $formatted_student_number = substr($student->number, 0, 3).'-'.substr($student->number, 3, -4).'-'.substr($student->number, 5, 8); ?>
  69. <tr>
  70. <td>{{$i+1}}</td>
  71. <td>{{ $student->name }}</td>
  72. <td>{{ $formatted_student_number }}</td>
  73. <td>{{ $student->school_code }}</td>
  74. <td>{{ $student->conc_code }}</td>
  75. </tr>
  76. @endforeach
  77. </tbdody>
  78. </table>
  79. @else
  80. <div class="alert alert-info"><p>No students. <a href=""></a></p></div>
  81. @endif
  82. </div>
  83. <div class="col-md-7">
  84. <h4>Activities</h4>
  85. @if($course->activities->count())
  86. <table class="table table-striped table-condensed">
  87. <thead>
  88. <tr>
  89. <th>Name</th>
  90. <th>Date</th>
  91. <th>Rubric</th>
  92. <th>Transformative Action</th>
  93. </tr>
  94. </thead>
  95. <tbody>
  96. @foreach($course->activities as $activity)
  97. <tr>
  98. <?php
  99. Log::info($activity);
  100. Log::info($activity->rubric);
  101. $bool = empty($activity->rubric);
  102. Log::info($bool);
  103. ?>
  104. <td>{{{ $activity->name }}}</td>
  105. <td>{{{ date('m/d/y', strtotime($activity->updated_at)) }}}</td>
  106. <td>
  107. @if(isset($activity->rubric[0]))
  108. {{ HTML::linkAction('RubricsController@show_limited', $activity->rubric[0]->name, array($activity->rubric[0]->id)) }}
  109. @endif
  110. </td>
  111. @if(isset($activity->transforming_action))
  112. <td><strong>{{ $activity->transforming_action->at_text }}: </strong>{{$activity->transforming_action->description}}</td>
  113. @else
  114. <td></td>
  115. @endif
  116. </tr>
  117. @endforeach
  118. </tbody>
  119. </table>
  120. @else
  121. None
  122. @endif
  123. </div>
  124. </div>
  125. @stop
  126. @section('included-js')
  127. <!-- HighCharts -->
  128. <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
  129. <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
  130. @stop
  131. @section('javascript')
  132. $(function () {
  133. $('#graph').highcharts({
  134. chart: {
  135. type: 'bar'
  136. },
  137. title: {
  138. text: 'Performance by Learning Outcome Criteria in {{ $title }}'
  139. },
  140. xAxis: {
  141. categories: [
  142. @foreach($outcomes as $outcome)
  143. "{{{ $outcome->name }}}<br>(N = {{$outcomes_attempted[$outcome->id]}}, {{$outcomes_achieved[$outcome->id]}})",
  144. @endforeach
  145. ],
  146. labels: {
  147. style: {
  148. fontSize:'11px'
  149. },
  150. step:1,
  151. useHTML:true,
  152. formatter: function() {
  153. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  154. },
  155. }
  156. },
  157. yAxis: {
  158. min: 0,
  159. max: 100,
  160. title: {
  161. text: 'Percentage'
  162. },
  163. @if($course->program->expected_outcome_target == null)
  164. plotLines:[{
  165. value:70.00,
  166. color: '#000',
  167. width:3,
  168. zIndex:4,
  169. label:{
  170. text: 'Goal (70.00%)',
  171. style: {
  172. color: '#000',
  173. fontSize: '14px',
  174. }
  175. }
  176. }]
  177. @else
  178. plotLines:[{
  179. value: {{$course->program->expected_outcome_target->expected_target }},
  180. color: '#000',
  181. width:3,
  182. zIndex:4,
  183. label:{
  184. text: 'Goal ({{$course->program->expected_outcome_target->expected_target}}%)',
  185. style: {
  186. color: '#000',
  187. fontSize: '14px',
  188. }
  189. }
  190. }]
  191. @endif
  192. },
  193. tooltip: {
  194. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  195. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  196. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  197. footerFormat: '</table>',
  198. shared: true,
  199. useHTML: true
  200. },
  201. plotOptions: {
  202. bar: {
  203. //grouping: false,
  204. shadow: false,
  205. borderWidth: 0,
  206. },
  207. series: {
  208. pointPadding: 0,
  209. groupPadding: 0.075
  210. },
  211. },
  212. series: [{
  213. name: 'Obtained Value',
  214. color: '#e70033',
  215. dataLabels: {
  216. enabled: true,
  217. fontSize: 8,
  218. color: '#fff',
  219. align: 'right',
  220. format: '{y:.1f}%',
  221. style: {
  222. //fontWeight: 'bold'
  223. },
  224. y:-1
  225. },
  226. data:[
  227. @foreach($outcomes as $index => $outcome)
  228. @if(
  229. is_array($outcomes_attempted)
  230. && array_key_exists($outcome->id, $outcomes_attempted)
  231. && $outcomes_attempted[$outcome->id]!=0)
  232. {{{ ($outcomes_achieved[$outcome->id]/$outcomes_attempted[$outcome->id])*100 }}},
  233. @else
  234. 0,
  235. @endif
  236. @endforeach
  237. ]
  238. }/*, {
  239. name: 'Expected Value',
  240. color: '#555555',
  241. dataLabels: {
  242. enabled: true,
  243. fontSize: 8,
  244. color: '#fff',
  245. align: 'right',
  246. format: '{y:.1f}%',
  247. style: {
  248. //fontWeight: 'bold'
  249. },
  250. y:-1
  251. },
  252. data: [
  253. @foreach($outcomes as $index => $outcome)
  254. @if(
  255. is_array($outcomes_attempted)
  256. && array_key_exists($outcome->id, $outcomes_attempted)
  257. && $outcomes_attempted[$outcome->id]!=0)
  258. {{{ $outcome->expected_outcome }}},
  259. @else
  260. 0,
  261. @endif
  262. @endforeach
  263. ]
  264. }*/]
  265. });
  266. });
  267. // Include dummy graph for outcomes
  268. @include('global.dummy-outcomes')
  269. @stop