From db3ab180a418e0d2f14bd77212181edddcd35e95 Mon Sep 17 00:00:00 2001 From: fazlulShanto Date: Tue, 9 Jul 2024 03:00:26 +0600 Subject: [PATCH] update: quiz_template view --- main.py | 4 +- quiz_template.html | 700 ++++++++++++++++++++++++++++++--------------- 2 files changed, 479 insertions(+), 225 deletions(-) diff --git a/main.py b/main.py index f8b9ebc..28167f0 100644 --- a/main.py +++ b/main.py @@ -1676,10 +1676,12 @@ def process_normal_quiz(quiz, lecture, chapter_dir): lecture_path = os.path.join(chapter_dir, lecture_file_name) logger.info(f" > Processing quiz {lecture_index}") - with open("quiz_template.html", "r") as f: html = f.read() quiz_data = { + "quiz_id":lecture["data"].get("id"), + "quiz_description":lecture["data"].get("description"), + "quiz_title": lecture["data"].get("title"), "pass_percent": lecture.get("data").get("pass_percent"), "questions": quiz["contents"], } diff --git a/quiz_template.html b/quiz_template.html index 3428a22..f8ebae6 100644 --- a/quiz_template.html +++ b/quiz_template.html @@ -1,263 +1,515 @@ + - Quiz - + Quiz -
- Score: N/A of N/A -
-
+
+
+

+

+
+
+
+ Score: 999 of + 999% +
+
Correct: 999
+
Incorrect: 999
+
+ +
+ + + + +
- + + \ No newline at end of file