설명 없음

limited-course.blade.php 7.6KB

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