From 8747c671d87418be83c8c6b9849e2962cdbb0715 Mon Sep 17 00:00:00 2001 From: adityacp Date: Sat, 24 Oct 2020 16:42:10 +0530 Subject: Improve lesson statistics --- yaksh/templates/base.html | 7 +- yaksh/templates/manage.html | 7 ++ yaksh/templates/user.html | 8 +- yaksh/templates/yaksh/show_lesson_statistics.html | 51 +++++++++---- yaksh/templates/yaksh/show_video.html | 93 ++++++++++++----------- 5 files changed, 100 insertions(+), 66 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/base.html b/yaksh/templates/base.html index 2cc607c..a108f8c 100644 --- a/yaksh/templates/base.html +++ b/yaksh/templates/base.html @@ -54,14 +54,9 @@ - + {% block script %} {% endblock %} diff --git a/yaksh/templates/manage.html b/yaksh/templates/manage.html index 53d5c72..047f784 100644 --- a/yaksh/templates/manage.html +++ b/yaksh/templates/manage.html @@ -65,6 +65,13 @@ + {% endblock %} {% block content %} diff --git a/yaksh/templates/user.html b/yaksh/templates/user.html index 4e3974b..7211d5c 100644 --- a/yaksh/templates/user.html +++ b/yaksh/templates/user.html @@ -43,7 +43,13 @@ {% endblock %} - + {% block content %} {% block main %} diff --git a/yaksh/templates/yaksh/show_lesson_statistics.html b/yaksh/templates/yaksh/show_lesson_statistics.html index 2bcdd2d..31261f3 100644 --- a/yaksh/templates/yaksh/show_lesson_statistics.html +++ b/yaksh/templates/yaksh/show_lesson_statistics.html @@ -102,6 +102,19 @@ {% endif %} {{tc.options}} + {% if per_tc_ans %} + {% get_tc_percent tc.id per_tc_ans as percent %} +
+ {% if percent %} +
+ {{percent}}% +
+ {% else %} + 0% + {% endif %} +
+ {% endif %} {% elif question.type == "integer" %} Answer: {{tc.correct}} @@ -116,33 +129,43 @@
+ Total Submissions: {{total_count}} +

+ {% if question.type != 'mcq' and question.type != 'mcc' %} +
+ +

+ {% endif %} {% include "yaksh/paginator.html" %} - - + {% for data in objects.object_list %} - + {% get_answers data.toc_id data.student_id as user_answer %} - {% endfor %}
Sr No. Student Name EmailLatest AnswerStatusLatest Submission
{{forloop.counter}}{{ forloop.counter0|add:objects.start_index }} {{data.student__first_name}} {{data.student__last_name}} {{data.student__email}}{{ user_answer.0 }} - {% if user_answer.1 %} - - Correct - - {% else %} - - Incorrect - - {% endif %} -
diff --git a/yaksh/templates/yaksh/show_video.html b/yaksh/templates/yaksh/show_video.html index 6e3cabb..58c7e04 100644 --- a/yaksh/templates/yaksh/show_video.html +++ b/yaksh/templates/yaksh/show_video.html @@ -140,9 +140,9 @@ {% else %}
+ {% if lesson.video_path %}
- {% if lesson.video_path %} {% with lesson.video_path|video_name as video %} {% if video.1 == "others" %}
+ {% if toc %}
-
- -
-
- - {% for content in toc %} - {% with content.get_toc_text as toc_name %} - - - - - - - - {% endwith %} - {% empty %} -
- No Table of contents added -
- {% endfor %} -
- - {{ toc_name }} - - - {{content.get_content_display}} - - {{content.time}} -
+
+ +
+
+ + {% for content in toc %} + {% with content.get_toc_text as toc_name %} + + + + + + + + {% endwith %} + {% empty %} +
+ No Table of contents added +
+ {% endfor %} +
+ + {{ toc_name }} + + + {{content.get_content_display}} + + {{content.time}} +
+
-
+ {% endif %} + {% endif %}
- - Next  - -

Lesson Description

@@ -227,23 +225,28 @@
+
+ + Next  + +
{% endif %} {% if state == 'lesson' %} -
- Add comment: +
+ Comments:
{% csrf_token %} - {{form}} + {{form.as_p}}
- +
{% endif %}
{% if comments %} {% for comment in comments %} -
+
-- cgit