暫無描述

limited-course.blade.php 8.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  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. <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>Transforming 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. <td>{{{ $activity->transforming_actions() }}}</td>
  104. </tr>
  105. @endforeach
  106. </tbody>
  107. </table>
  108. @else
  109. None
  110. @endif
  111. </div>
  112. </div>
  113. @stop
  114. @section('included-js')
  115. <!-- HighCharts -->
  116. <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
  117. <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
  118. @stop
  119. @section('javascript')
  120. $(function () {
  121. $('#graph').highcharts({
  122. chart: {
  123. type: 'bar'
  124. },
  125. title: {
  126. text: 'Performance by Learning Outcome Criteria in {{ $title }}'
  127. },
  128. xAxis: {
  129. categories: [
  130. @foreach($outcomes as $outcome)
  131. "{{{ $outcome->name }}}",
  132. @endforeach
  133. ],
  134. labels: {
  135. style: {
  136. fontSize:'11px'
  137. },
  138. step:1,
  139. useHTML:true,
  140. formatter: function() {
  141. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  142. },
  143. }
  144. },
  145. yAxis: {
  146. min: 0,
  147. max: 100,
  148. title: {
  149. text: 'Percentage'
  150. }
  151. },
  152. tooltip: {
  153. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  154. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  155. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  156. footerFormat: '</table>',
  157. shared: true,
  158. useHTML: true
  159. },
  160. plotOptions: {
  161. bar: {
  162. //grouping: false,
  163. shadow: false,
  164. borderWidth: 0,
  165. },
  166. series: {
  167. pointPadding: 0,
  168. groupPadding: 0.075
  169. },
  170. },
  171. series: [{
  172. name: 'Obtained Value',
  173. color: '#e70033',
  174. dataLabels: {
  175. enabled: true,
  176. fontSize: 8,
  177. color: '#fff',
  178. align: 'right',
  179. format: '{y:.1f}%',
  180. style: {
  181. //fontWeight: 'bold'
  182. },
  183. y:-1
  184. },
  185. data:[
  186. @foreach($outcomes as $index => $outcome)
  187. @if(
  188. is_array($outcomes_attempted)
  189. && array_key_exists($outcome->id, $outcomes_attempted)
  190. && $outcomes_attempted[$outcome->id]!=0)
  191. {{{ ($outcomes_achieved[$outcome->id]/$outcomes_attempted[$outcome->id])*100 }}},
  192. @else
  193. 0,
  194. @endif
  195. @endforeach
  196. ]
  197. }, {
  198. name: 'Expected Value',
  199. color: '#555555',
  200. dataLabels: {
  201. enabled: true,
  202. fontSize: 8,
  203. color: '#fff',
  204. align: 'right',
  205. format: '{y:.1f}%',
  206. style: {
  207. //fontWeight: 'bold'
  208. },
  209. y:-1
  210. },
  211. data: [
  212. @foreach($outcomes as $index => $outcome)
  213. @if(
  214. is_array($outcomes_attempted)
  215. && array_key_exists($outcome->id, $outcomes_attempted)
  216. && $outcomes_attempted[$outcome->id]!=0)
  217. {{{ $outcome->expected_outcome }}},
  218. @else
  219. 0,
  220. @endif
  221. @endforeach
  222. ]
  223. }]
  224. });
  225. });
  226. // Include dummy graph for outcomes
  227. @include('global.dummy-outcomes')
  228. @stop