tracking_course_log.tpl 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <!-- tracking course log -->
  2. <script>
  3. window.onload = function() {
  4. var scoreStudent = document.getElementById("chart-score").getContext('2d');
  5. var lastAccess = document.getElementById("chart-access").getContext('2d');
  6. var jsonfile = {{ json_time_student }};
  7. var labels = [];
  8. var times = [];
  9. Object.keys(jsonfile).forEach(function(key) {
  10. //Names
  11. labels.push(jsonfile[key].fullname);
  12. //Time plataform total
  13. times.push(jsonfile[key].total_time);
  14. });
  15. var myChartAccess = new Chart(lastAccess, {
  16. type: 'line',
  17. data: {
  18. labels: labels,
  19. datasets: [{
  20. data: times,
  21. borderColor: "#3ba557",
  22. backgroundColor: "#3ba557",
  23. borderWidth: 1,
  24. fill: false,
  25. label: '{{ "Minutes"|get_lang|e('js') }}',
  26. }]
  27. },
  28. options: {
  29. legend:{
  30. display: false
  31. },
  32. scales: {
  33. xAxes:[{
  34. position: "bottom",
  35. scaleLabel: {
  36. display: true,
  37. labelString: '{{ "Students"|get_lang|e('js') }}',
  38. },
  39. ticks: {
  40. display: false
  41. }
  42. }],
  43. yAxes: [{
  44. position: "left",
  45. scaleLabel: {
  46. display: true,
  47. labelString: '{{ "Minutes"|get_lang|e('js') }}',
  48. }
  49. }]
  50. }
  51. }
  52. });
  53. var myChartScore = new Chart(scoreStudent, {
  54. type: 'bar',
  55. data: {
  56. labels: ["0-9%", "10-19%", "20-29%", "30-39%", "40-49%", "50-59%", "60-69%", "70-79%", "80-89%", "90-100%"],
  57. datasets: [{
  58. label: '{{ "NumberOfUsers"|get_lang|e('js') }}',
  59. data: {{ score_distribution }},
  60. backgroundColor: {{ chart_colors }},
  61. borderColor: {{ chart_colors }},
  62. borderWidth: 1,
  63. fill: false
  64. }]
  65. },
  66. options: {
  67. legend:{
  68. display: false
  69. },
  70. scales: {
  71. yAxes: [{
  72. position: "left",
  73. scaleLabel: {
  74. display: true,
  75. labelString: '{{ "NumberOfUsers"|get_lang|e('js') }}',
  76. },
  77. ticks: {
  78. display: true,
  79. min: 0,
  80. stepSize: 1
  81. }
  82. }],
  83. xAxes:[{
  84. position: "bottom",
  85. scaleLabel: {
  86. display: true,
  87. labelString: "{{ 'PercentileScoresDistribution'|get_lang|e('js') }}",
  88. },
  89. gridLines: {
  90. display: true
  91. },
  92. ticks: {
  93. display: false,
  94. }
  95. }],
  96. }
  97. }
  98. });
  99. };
  100. </script>
  101. <div class="tracking-course-summary">
  102. <div class="row">
  103. <div class="col-lg-3 col-sm-3">
  104. <div class="panel panel-default tracking tracking-student">
  105. <div class="panel-body">
  106. <span class="tracking-icon">
  107. <i class="fa fa-graduation-cap" aria-hidden="true"></i>
  108. </span>
  109. <div class="tracking-info">
  110. <div class="tracking-text"> {{ "NumberOfUsers"|get_lang }}</div>
  111. <div class="tracking-number">
  112. {{ number_students }}
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. <div class="col-lg-3 col-sm-3">
  119. <div class="panel panel-default tracking tracking-lessons">
  120. <div class="panel-body">
  121. <span class="tracking-icon">
  122. <i class="fa fa-book" aria-hidden="true"></i>
  123. </span>
  124. <div class="tracking-info">
  125. <div class="tracking-text"> {{ "CourseProgress"|get_lang }}</div>
  126. <div class="tracking-number">
  127. {{ students_completed_lp }}/{{ number_students }}
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. <div class="col-lg-3 col-sm-3">
  134. <div class="panel panel-default tracking tracking-exercise">
  135. <div class="panel-body">
  136. <span class="tracking-icon">
  137. <i class="fa fa-heartbeat" aria-hidden="true"></i>
  138. </span>
  139. <div class="tracking-info">
  140. <div class="tracking-text"> {{ "ExerciseAverage"|get_lang }}</div>
  141. <div class="tracking-number">
  142. {{ students_test_score }}%
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. </div>
  148. <div class="col-lg-3 col-sm-3">
  149. <div class="panel panel-default tracking tracking-certificate">
  150. <div class="panel-body">
  151. <span class="tracking-icon">
  152. <i class="fa fa-id-card-o" aria-hidden="true"></i>
  153. </span>
  154. <div class="tracking-info">
  155. <div class="tracking-text"> {{ "CountCertificates"|get_lang }}</div>
  156. <div class="tracking-number">
  157. {{ certificate_count }}/{{ number_students }}
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. <div class="row">
  165. <div class="col-md-4">
  166. <div class="panel panel-default">
  167. <div class="panel-body">
  168. <div class="tracking-chart">
  169. <h4 class="tracking-box-title">{{ 'PercentileScoresDistribution'|get_lang }}</h4>
  170. <canvas id="chart-score"></canvas>
  171. </div>
  172. </div>
  173. </div>
  174. </div>
  175. <div class="col-md-4">
  176. <div class="panel panel-default tracking-top-student">
  177. <div class="panel-body">
  178. <h4 class="tracking-box-title">{{ 'OutstandingStudents'|get_lang }}</h4>
  179. <ul class="list-top">
  180. {% for student in top_students %}
  181. {% set counter = counter + 1 %}
  182. {% if counter <= 3 %}
  183. <li>
  184. <div class="avatar">
  185. <span class="round">
  186. <img
  187. title="{{ student.fullname }}"
  188. alt="{{ student.fullname }}"
  189. src="{{ student.avatar }}"
  190. width="40px">
  191. </span>
  192. </div>
  193. <div class="info">
  194. <h3 class="name">{{ student.fullname }}</h3>
  195. <div class="progress">
  196. <div
  197. class="progress-bar progress-bar-success progress-bar-striped"
  198. role="progressbar"
  199. aria-valuenow="{{ student.score }}" aria-valuemin="0"
  200. aria-valuemax="100" style="width: {{ student.score }}%;">
  201. {{ student.score }}%
  202. </div>
  203. </div>
  204. </div>
  205. </li>
  206. {% endif %}
  207. {% endfor %}
  208. </ul>
  209. <span class="tracking-box-legend">
  210. {{ 'ProgressObtainedFromLPProgressAndTestsAverage'|get_lang }}
  211. </span>
  212. </div>
  213. </div>
  214. </div>
  215. <div class="col-md-4">
  216. <div class="panel panel-default">
  217. <div class="panel-body">
  218. <h4 class="tracking-box-title">{{ "TotalTimeSpentInTheCourse"|get_lang }}</h4>
  219. <canvas id="chart-access"></canvas>
  220. </div>
  221. </div>
  222. </div>
  223. </div>
  224. </div>