From 28024874d643f1708ccc3f4ad3c34170b8386937 Mon Sep 17 00:00:00 2001 From: Adil Mohak Date: Sun, 29 Sep 2024 09:55:26 +0300 Subject: [PATCH] Quiz form validation and minor UI fixes --- templates/quiz/mcquestion_form.html | 19 ++++++++++++++----- templates/quiz/quiz_list.html | 5 +++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/templates/quiz/mcquestion_form.html b/templates/quiz/mcquestion_form.html index 2d68194..7cae6a7 100644 --- a/templates/quiz/mcquestion_form.html +++ b/templates/quiz/mcquestion_form.html @@ -14,9 +14,18 @@ -
Add questions [{{ quiz_obj|truncatechars:15 }}]
-

-{{ formset.non_form_errors }} +
Add questions [{{ quiz_obj|truncatechars:15 }}]
+ +{% if formset.non_form_errors %} +
+ +
+{% endif %} +
{{ quizQuestions }} question added
@@ -40,11 +49,11 @@
- {{ fs.correct }} Correct + {{ fs.correct }} Correct
{{ fs.choice }}
- {{ fs.DELETE }} Delete + {{ fs.DELETE }} Delete
{% endfor %} diff --git a/templates/quiz/quiz_list.html b/templates/quiz/quiz_list.html index 283111b..326f337 100644 --- a/templates/quiz/quiz_list.html +++ b/templates/quiz/quiz_list.html @@ -72,6 +72,11 @@
+ + {% empty %} +

+ Course quizzes will appear here. +

{% endfor %}