diff options
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/templates/yaksh/show_lesson_statistics.html | 6 | ||||
-rw-r--r-- | yaksh/templatetags/custom_filters.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/yaksh/templates/yaksh/show_lesson_statistics.html b/yaksh/templates/yaksh/show_lesson_statistics.html index a7c2ebd..dfce52c 100644 --- a/yaksh/templates/yaksh/show_lesson_statistics.html +++ b/yaksh/templates/yaksh/show_lesson_statistics.html @@ -1,7 +1,7 @@ {% extends "manage.html" %} {% load static %} {% load custom_filters %} -{% block title %} Lesson Statistics {% endblock %} +{% block title %} Lesson Quiz Stats {% endblock %} {% block pagetitle %} Statistics for {{lesson}} {% endblock %} {% block script %} <script type="text/javascript" src="{% static 'yaksh/js/jquery.tablesorter.min.js' %}"> @@ -135,8 +135,8 @@ <div class="progress" style="width: 30%"> {% if percent %} <div class="progress-bar bg-success" role="progressbar" aria-valuenow="{{percent}}" - aria-valuemin="0" aria-valuemax="100" style="width:{{percent}}%"> - <b style="color: white;">{{percent}}%</b> + aria-valuemin="0" aria-valuemax="100" style="width:{{percent|floatformat}}%"> + <b style="color: white;">{{percent|floatformat}}%</b> </div> {% else %} <b style="color: black;">0%</b> diff --git a/yaksh/templatetags/custom_filters.py b/yaksh/templatetags/custom_filters.py index 91681c2..7eba939 100644 --- a/yaksh/templatetags/custom_filters.py +++ b/yaksh/templatetags/custom_filters.py @@ -209,5 +209,5 @@ def get_tc_percent(tc_id, data): def get_lesson_views(course_id, lesson_id): course = Course.objects.get(id=course_id) return TrackLesson.objects.filter( - course_id=course_id, lesson_id=lesson_id + course_id=course_id, lesson_id=lesson_id, watched=True ).count(), course.students.count() |