From 4310d5905a9cc702198e42830c1b670957cd7360 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Wed, 3 Jan 2018 19:27:25 +0530 Subject: Made UI changes as per suggestion Added view answerpaper option to exercise form. --- yaksh/forms.py | 2 +- yaksh/templates/yaksh/course_modules.html | 16 ++++++++++++---- yaksh/templates/yaksh/courses.html | 11 ++++++++--- yaksh/templates/yaksh/question.html | 16 +++++++--------- yaksh/templates/yaksh/quit.html | 10 +++++++--- yaksh/templates/yaksh/view_answerpaper.html | 10 +++++++++- yaksh/views.py | 6 +++--- 7 files changed, 47 insertions(+), 24 deletions(-) (limited to 'yaksh') diff --git a/yaksh/forms.py b/yaksh/forms.py index 84db33e..8399bc9 100644 --- a/yaksh/forms.py +++ b/yaksh/forms.py @@ -176,7 +176,7 @@ class UserLoginForm(forms.Form): class ExerciseForm(forms.ModelForm): class Meta: model = Quiz - fields = ['description'] + fields = ['description', 'view_answerpaper'] class QuizForm(forms.ModelForm): diff --git a/yaksh/templates/yaksh/course_modules.html b/yaksh/templates/yaksh/course_modules.html index 8e6f5a6..fad1be0 100644 --- a/yaksh/templates/yaksh/course_modules.html +++ b/yaksh/templates/yaksh/course_modules.html @@ -31,7 +31,7 @@ - View Lessons/Quizzes + View Lessons/Quizzes/Exercises
Lesson/Quiz | +Lesson/Quiz/Exercise | Status | Type | View AnswerPaper | @@ -85,7 +85,15 @@ {% endif %}- {{unit.type|title}} + {% if unit.type == "quiz" %} + {% if unit.quiz.is_exercise %} + Exercise + {% else %} + Quiz + {% endif %} + {% else %} + Lesson + {% endif %} |
{% if unit.type == "quiz" %}
@@ -109,4 +117,4 @@
{% else %}
No lectures found{% endif %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index 2456433..b6b9f7e 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -151,7 +151,7 @@ {% for unit in module.get_learning_units %}
|
---|