Без опису

limited-course.blade.php 8.7KB

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