diff options
Diffstat (limited to 'stats/templates/view_lesson_tracking.html')
-rw-r--r-- | stats/templates/view_lesson_tracking.html | 29 |
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 <i class="fa fa-sort"></i></th> <th>Current Duration <i class="fa fa-sort"></i></th> <th>Video Duration <i class="fa fa-sort"></i></th> - <th>Percentage watched <i class="fa fa-sort"></i></th> - <th>Total visits <i class="fa fa-sort"></i></th> + <th>Percentage Watched <i class="fa fa-sort"></i></th> + <th>Watched Once Completely <i class="fa fa-sort"></i></th> + <th>Total Time Spent <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 %} |