summaryrefslogtreecommitdiff
path: root/stats/templates
diff options
context:
space:
mode:
authorprathamesh2020-11-09 15:52:56 +0530
committerprathamesh2020-11-09 15:52:56 +0530
commitb6f78c5db15cb7e34649ca67f3295dcb1a102bbe (patch)
tree68f1b3b669e1ad265e6b79a227716e2bbc14aa22 /stats/templates
parent530fb70da288d53be0c7e293121e807ffa2a73c2 (diff)
downloadonline_test-b6f78c5db15cb7e34649ca67f3295dcb1a102bbe.tar.gz
online_test-b6f78c5db15cb7e34649ca67f3295dcb1a102bbe.tar.bz2
online_test-b6f78c5db15cb7e34649ca67f3295dcb1a102bbe.zip
Modify Lesson Statistics
- gives total spent time - sets initial percentage to less than 25% - gives completion status(True or False)
Diffstat (limited to 'stats/templates')
-rw-r--r--stats/templates/view_lesson_tracking.html29
1 files changed, 10 insertions, 19 deletions
diff --git a/stats/templates/view_lesson_tracking.html b/stats/templates/view_lesson_tracking.html
index 7962410..ef5c9ae 100644
--- a/stats/templates/view_lesson_tracking.html
+++ b/stats/templates/view_lesson_tracking.html
@@ -15,15 +15,6 @@
$(document).ready(function() {
$("#stats-table").tablesorter({});
- $('#stats-table tr').each(function() {
- var td = $(this).find("td");
- var elapsed = td.eq(4).html();
- var duration = td.eq(5).html();
- if (elapsed != undefined || duration != undefined) {
- percent = (get_time_in_seconds(elapsed) / get_time_in_seconds(duration)) * 100;
- td.eq(6).html(Math.round(percent));
- }
- });
});
</script>
{% endblock %}
@@ -49,22 +40,22 @@
<th>Started on&nbsp;<i class="fa fa-sort"></i></th>
<th>Current Duration&nbsp;<i class="fa fa-sort"></i></th>
<th>Video Duration&nbsp;<i class="fa fa-sort"></i></th>
- <th>Percentage watched&nbsp;<i class="fa fa-sort"></i></th>
- <th>Total visits&nbsp;<i class="fa fa-sort"></i></th>
+ <th>Percentage Watched&nbsp;<i class="fa fa-sort"></i></th>
+ <th>Watched Once Completely&nbsp;<i class="fa fa-sort"></i></th>
+ <th>Total Time Spent&nbsp;<i class="fa fa-sort"></i></th>
</tr>
</thead>
{% for track in trackings %}
<tr>
<td>{{ forloop.counter0|add:objects.start_index }}</td>
<td>{{track.user.get_full_name}}</td>
- {% with track.get_last_access_time_and_vists as time_and_visits %}
- <td>{{time_and_visits.0}}</td>
+ <td>{{track.get_last_access_time}}</td>
<td>{{track.creation_time}}</td>
- <td>{{track.current_time}}</td>
- <td>{{track.video_duration}}</td>
- <td></td>
- <td>{{time_and_visits.1}}</td>
- {% endwith %}
+ <td>{{track.get_current_time}}</td>
+ <td>{{track.get_video_duration}}</td>
+ <td>{{track.get_percentage_complete}}</td>
+ <td>{{track.get_watched}}</td>
+ <td>{{track.time_spent}}</td>
</tr>
{% endfor %}
</table>
@@ -72,4 +63,4 @@
<br>
{% include "yaksh/paginator.html" %}
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}