From 83949a7cc5e4fe1f8697d0873015466ec8e96110 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Tue, 8 Jan 2019 15:58:26 +0530 Subject: Fix Overall Course Completion percentage in Student interface --- yaksh/templates/yaksh/course_modules.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yaksh/templates/yaksh/course_modules.html b/yaksh/templates/yaksh/course_modules.html index 9d936d6..990c843 100644 --- a/yaksh/templates/yaksh/course_modules.html +++ b/yaksh/templates/yaksh/course_modules.html @@ -18,7 +18,7 @@
-
{{course}}
+
{{ course.name }}
Overall @@ -26,7 +26,7 @@
- 50% completed + {{ course_percentage }} % completed
-- cgit From c04f586f8ac85bf0fd0290b97c8d727e4e21274c Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Wed, 9 Jan 2019 15:18:30 +0530 Subject: Multiple changes in new UI: - Deprecate usage of 'course_completion_percent' custom template tag - Replace old code in course_detail.html --- yaksh/templates/yaksh/course_detail.html | 66 +++++++++++++------------------- yaksh/templatetags/custom_filters.py | 5 --- 2 files changed, 26 insertions(+), 45 deletions(-) diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html index 0fee438..54af854 100644 --- a/yaksh/templates/yaksh/course_detail.html +++ b/yaksh/templates/yaksh/course_detail.html @@ -141,61 +141,47 @@ Sr No. - Students - Total + Email + Current Unit + Course Completion Percentage Grade - Modules - - - - - - - {% if modules %} - {% for module in modules %} - - {{module.name}} - ({{module.get_learning_units|length}} Units) -
- - View Units - - {% endfor %} - {% else %} - - {% endif %} - {% for student in students %} + {% for student, grade, percent, unit in student_details %} {{forloop.counter}}. + + + {% if student.email %} + {{ student.email }} + {% else %} + {{ student.get_full_name|title}} + {% endif %} + + + {{ student.get_full_name|title }} + {% if unit %} + {% if unit.type == 'quiz' %} + {{unit.quiz.description}} + {% else %} + {{unit.lesson.name}} + {% endif %} + {% else %} + NA + {% endif%} - {% course_completion_percent course student as c_percent %} - {{c_percent}} % + {{ percent }} % - {% course_grade course student as grade %} - {{grade}} + {{ grade }} - {% if modules %} - {% for module in modules %} - - {% module_completion_percent course module student as m_percent %} - {{m_percent}} % -
- - View Unit Status - - {% endfor %} - {% else %} - ------- - {% endif %} {% endfor %} diff --git a/yaksh/templatetags/custom_filters.py b/yaksh/templatetags/custom_filters.py index b4b189a..dcae7f9 100644 --- a/yaksh/templatetags/custom_filters.py +++ b/yaksh/templatetags/custom_filters.py @@ -60,11 +60,6 @@ def module_completion_percent(course, module, user): return module.get_module_complete_percent(course, user) -@register.simple_tag -def course_completion_percent(course, user): - return course.percent_completed(user) - - @register.simple_tag def get_ordered_testcases(question, answerpaper): return question.get_ordered_test_cases(answerpaper) -- cgit From ac0436841ba144950472ee53f1d3a85188b2fe76 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Thu, 10 Jan 2019 16:15:17 +0530 Subject: Remove duplicate progress bars (Units/Lessons should not have progress bars) --- yaksh/templates/user.html | 1 - yaksh/templates/yaksh/course_modules.html | 19 +++---------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/yaksh/templates/user.html b/yaksh/templates/user.html index db65195..4ded0a3 100644 --- a/yaksh/templates/user.html +++ b/yaksh/templates/user.html @@ -28,7 +28,6 @@ Change Password Logout -
diff --git a/yaksh/templates/yaksh/course_modules.html b/yaksh/templates/yaksh/course_modules.html index 990c843..917f78c 100644 --- a/yaksh/templates/yaksh/course_modules.html +++ b/yaksh/templates/yaksh/course_modules.html @@ -110,15 +110,15 @@ {% get_module_status user module course as module_status %} {% if module_status == "completed" %}
-
100% completed
+
{{ percent }} % completed
{% elif module_status == "inprogress" %}
-
50% completed
+
{{ percent }} % completed
{% else %}
-
0% completed
+
{{ percent }} % completed
{% endif %}
@@ -176,19 +176,6 @@ ------ {% endif %} - -
- {% if percent <= 50 %} -
- {% elif percent <= 75 %} -
- {% else %} -
- {% endif %} - {{percent}}% Completed -
-
- {% endfor %} -- cgit From ef7d0f3b8b2cb46bb04d90d0f3f05aab8b1a33dc Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Thu, 10 Jan 2019 16:16:16 +0530 Subject: Remove unnecessary HTML divider in Logout dropdown --- yaksh/templates/manage.html | 1 - 1 file changed, 1 deletion(-) diff --git a/yaksh/templates/manage.html b/yaksh/templates/manage.html index fbd4c64..f8edeef 100644 --- a/yaksh/templates/manage.html +++ b/yaksh/templates/manage.html @@ -31,7 +31,6 @@ Change Password Logout -
-- cgit From e03a744499d5c2ac4f8414ac06a1e5437c05fc16 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Wed, 16 Jan 2019 14:54:16 +0530 Subject: Add roll number columns and fix UI --- yaksh/templates/yaksh/course_detail.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html index 54af854..a0a6ed2 100644 --- a/yaksh/templates/yaksh/course_detail.html +++ b/yaksh/templates/yaksh/course_detail.html @@ -141,6 +141,7 @@ Sr No. + Roll No. Email Current Unit Course Completion Percentage @@ -153,6 +154,9 @@ {{forloop.counter}}. + + {{ student.profile.roll_number}} + {% if student.email %} @@ -160,6 +164,7 @@ {% else %} {{ student.get_full_name|title}} {% endif %} + -- cgit