From b6f78c5db15cb7e34649ca67f3295dcb1a102bbe Mon Sep 17 00:00:00 2001 From: prathamesh Date: Mon, 9 Nov 2020 15:52:56 +0530 Subject: Modify Lesson Statistics - gives total spent time - sets initial percentage to less than 25% - gives completion status(True or False) --- stats/templates/view_lesson_tracking.html | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'stats/templates/view_lesson_tracking.html') 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)); - } - }); }); {% endblock %} @@ -49,22 +40,22 @@ Started on  Current Duration  Video Duration  - Percentage watched  - Total visits  + Percentage Watched  + Watched Once Completely  + Total Time Spent  {% for track in trackings %} {{ forloop.counter0|add:objects.start_index }} {{track.user.get_full_name}} - {% with track.get_last_access_time_and_vists as time_and_visits %} - {{time_and_visits.0}} + {{track.get_last_access_time}} {{track.creation_time}} - {{track.current_time}} - {{track.video_duration}} - - {{time_and_visits.1}} - {% endwith %} + {{track.get_current_time}} + {{track.get_video_duration}} + {{track.get_percentage_complete}} + {{track.get_watched}} + {{track.time_spent}} {% endfor %} @@ -72,4 +63,4 @@
{% include "yaksh/paginator.html" %} -{% endblock %} \ No newline at end of file +{% endblock %} -- cgit