You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
196 lines
8.2 KiB
196 lines
8.2 KiB
<!-- tracking course log -->
|
|
<script>
|
|
$(() => {
|
|
var scoreStudent = document.getElementById("chart-score").getContext('2d');
|
|
var lastAccess = document.getElementById("chart-access").getContext('2d');
|
|
var jsonfile = {{ json_time_student|raw }};
|
|
var labels = [];
|
|
var times = [];
|
|
|
|
Object.keys(jsonfile).forEach(function(key) {
|
|
// Names
|
|
labels.push(jsonfile[key].fullname);
|
|
// Time platform total
|
|
times.push(jsonfile[key].total_time);
|
|
});
|
|
|
|
var myChartAccess = new Chart(lastAccess, {
|
|
type: 'line',
|
|
data: {
|
|
labels: labels,
|
|
datasets: [{
|
|
data: times,
|
|
borderColor: "#3ba557",
|
|
backgroundColor: "#3ba557",
|
|
borderWidth: 1,
|
|
fill: false,
|
|
label: '{{ "Minutes"|get_lang|e('js') }}',
|
|
}]
|
|
},
|
|
options: {
|
|
legend:{
|
|
display: false
|
|
},
|
|
scales: {
|
|
x: {
|
|
position: "bottom",
|
|
title: {
|
|
display: true,
|
|
text: '{{ "Students"|get_lang|e('js') }}'
|
|
},
|
|
ticks: { display: false },
|
|
min: 0
|
|
},
|
|
y: {
|
|
title: {
|
|
display: true,
|
|
text: '{{ "Minutes"|get_lang|e('js') }}'
|
|
},
|
|
position: "left",
|
|
min: 0
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
var myChartScore = new Chart(scoreStudent, {
|
|
type: 'bar',
|
|
data: {
|
|
labels: ["0-9%", "10-19%", "20-29%", "30-39%", "40-49%", "50-59%", "60-69%", "70-79%", "80-89%", "90-100%"],
|
|
datasets: [{
|
|
label: '{{ "Number of users"|get_lang|e('js') }}',
|
|
data: {{ score_distribution|raw }},
|
|
backgroundColor: {{ chart_colors|raw }},
|
|
borderColor: {{ chart_colors|raw }},
|
|
borderWidth: 1,
|
|
fill: false
|
|
}]
|
|
},
|
|
options: {
|
|
legend:{
|
|
display: false
|
|
},
|
|
scales: {
|
|
y: {
|
|
position: "left",
|
|
title: {
|
|
text: '{{ "Number of users"|get_lang|e('js') }}',
|
|
display: true
|
|
},
|
|
ticks: {
|
|
display: true,
|
|
min: 0,
|
|
stepSize: 1
|
|
},
|
|
min: 0
|
|
},
|
|
x: {
|
|
position: "bottom",
|
|
title: {
|
|
text: "{{ 'PercentileScoresDistribution'|get_lang|e('js') }}",
|
|
display: true
|
|
},
|
|
gridLines: { display: true },
|
|
ticks: { display: true, },
|
|
min: 0
|
|
},
|
|
}
|
|
}
|
|
});
|
|
})
|
|
</script>
|
|
|
|
<div class="tracking-course-summary">
|
|
<div class="grid grid-cols-4 gap-8 mt-4" style="display: flex; margin-bottom: 16pt;">
|
|
<div class="pt-2 flex justify-center rounded-md h-16 text-4xl border-0 hover:shadow-lg hover:border-0 hover:shadow-black" style="flex: 1; padding: 8pt;">
|
|
<i class="mdi mdi-account-group ch-tool-icon" style="font-size: 64px; width: 64px; height: 64px; display: block;" aria-hidden="true"></i>
|
|
{{ number_students }}
|
|
<div class="card-title text-center p-2 text-xl">
|
|
{{ "Number of users"|trans }}
|
|
</div>
|
|
</div>
|
|
<div class="pt-2 flex justify-center rounded-md h-16 text-4xl border-0 hover:shadow-lg hover:border-0 hover:shadow-black" style="flex: 1; padding: 8pt;">
|
|
<i class="mdi mdi-progress-check ch-tool-icon" style="font-size: 64px; width: 64px; height: 64px; display: block;" aria-hidden="true"></i>
|
|
{{ students_completed_lp }}/{{ number_students }}
|
|
<div class="card-title text-center p-2 text-xl">
|
|
{{ "Course progress"|trans }}
|
|
</div>
|
|
</div>
|
|
<div class="pt-2 flex justify-center rounded-md h-16 text-4xl border-0 hover:shadow-lg hover:border-0 hover:shadow-black" style="flex: 1; padding: 8pt;">
|
|
<i class="mdi mdi-chart-box ch-tool-icon" style="font-size: 64px; width: 64px; height: 64px; display: block;" aria-hidden="true"></i>
|
|
{{ students_test_score }}%
|
|
<div class="card-title text-center p-2 text-xl">
|
|
{{ "Exercise average"|trans }}
|
|
</div>
|
|
</div>
|
|
<div class="pt-2 flex justify-center rounded-md h-16 text-4xl border-0 hover:shadow-lg hover:border-0 hover:shadow-black" style="flex: 1; padding: 8pt;">
|
|
<i class="mdi mdi-certificate ch-tool-icon" style="font-size: 64px; width: 64px; height: 64px; display: block;" aria-hidden="true"></i>
|
|
{{ certificate_count }}/{{ number_students }}
|
|
<div class="card-title text-center p-2 text-xl">
|
|
{{ "Certificates count"|trans }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row" style="display: flex;">
|
|
<div class="col-md-4" style="flex: 1; margin: 8pt;">
|
|
<div class="panel panel-default">
|
|
<div class="panel-body">
|
|
<div class="tracking-chart">
|
|
<h4 class="tracking-box-title">{{ 'Percentile scores distribution'|trans }}</h4>
|
|
<canvas id="chart-score"></canvas>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4" style="flex: 1; margin: 8pt;">
|
|
<div class="panel panel-default tracking-top-student">
|
|
<div class="panel-body">
|
|
<h4 class="tracking-box-title">{{ 'Outstanding students'|trans }}</h4>
|
|
<ul class="list-top">
|
|
{% set counter = 1 %}
|
|
{% for student in top_students %}
|
|
{% set counter = counter + 1 %}
|
|
{% if counter <= 3 %}
|
|
<li>
|
|
<div class="avatar">
|
|
<span class="round">
|
|
<img
|
|
title="{{ student.fullname }}"
|
|
alt="{{ student.fullname }}"
|
|
src="{{ student.user | illustration }}"
|
|
width="40px">
|
|
</span>
|
|
</div>
|
|
<div class="info">
|
|
<h3 class="name">{{ student.fullname }}</h3>
|
|
<div class="progress">
|
|
<div
|
|
class="progress-bar progress-bar-success progress-bar-striped"
|
|
role="progressbar"
|
|
aria-valuenow="{{ student.score }}" aria-valuemin="0"
|
|
aria-valuemax="100" style="width: {{ student.score }}%;">
|
|
{{ student.score }}%
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
<span class="tracking-box-legend">
|
|
{{ 'Note: This progress is obtained through a combination of progress in the learning paths and average scores in the tests'|trans }}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4" style="flex: 1; margin: 8pt;">
|
|
<div class="panel panel-default">
|
|
<div class="panel-body">
|
|
<h4 class="tracking-box-title">{{ "Total time spent in the course"|trans }}</h4>
|
|
<canvas id="chart-access"></canvas>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|