From 323e34a6755e794c0177afdb36cd931d25db3d77 Mon Sep 17 00:00:00 2001 From: CruiseDevice Date: Fri, 12 Jul 2019 15:43:53 +0530 Subject: Resolve comments - Remove print statements. - Remove commented css from offline.css. - Change 127.0.0.1 to yaksh.fossee.in quiz.html for offline application. --- yaksh/models.py | 18 +++++++++++++----- yaksh/static/yaksh/css/offline.css | 12 ------------ yaksh/templates/yaksh/quiz.html | 6 +++--- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/yaksh/models.py b/yaksh/models.py index 2ae6f45..c97a616 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -578,12 +578,13 @@ class Quiz(models.Model): unit_file_path = os.sep.join(( path, "templates", "yaksh", "quiz.html" )) - quiz_data = {"course": course, "module": module, - "quiz": self, "next_unit": next_unit} + quiz_data = {"course": course, "module": module, + "quiz": self, "next_unit": next_unit} write_templates_to_zip(zip_file, unit_file_path, quiz_data, quiz_name, sub_folder_name) + ########################################################################## class LearningUnit(models.Model): """ Maintain order of lesson and quiz added in the course """ @@ -798,9 +799,17 @@ class LearningModule(models.Model): for idx, unit in enumerate(units): next_unit = units[(idx + 1) % len(units)] if unit.type == 'lesson': - unit.lesson._add_lesson_to_zip(next_unit, self, course, zip_file, path) + unit.lesson._add_lesson_to_zip(next_unit, + self, + course, + zip_file, + path) else: - unit.quiz._add_quiz_to_zip(next_unit, self, course, zip_file, path) + unit.quiz._add_quiz_to_zip(next_unit, + self, + course, + zip_file, + path) module_file_path = os.sep.join(( path, "templates", "yaksh", "module.html" @@ -1068,7 +1077,6 @@ class Course(models.Model): def create_zip(self, path, static_files): zip_file_name = string_io() with zipfile.ZipFile(zip_file_name, "a") as zip_file: - # print("HELLOOOOOOO - - - -- - - -- ") course_name = self.name.replace(" ", "_") modules = self.get_learning_modules() file_path = os.sep.join((path, "templates", "yaksh", "index.html")) diff --git a/yaksh/static/yaksh/css/offline.css b/yaksh/static/yaksh/css/offline.css index 79584e0..134f102 100644 --- a/yaksh/static/yaksh/css/offline.css +++ b/yaksh/static/yaksh/css/offline.css @@ -78,15 +78,3 @@ section{ .bg-grey{ background-color:#dbf9f2; } - - -/*.footer { - position: fixed; - left: 0; - bottom: 0; - width: 100%; - background-color: #D3D3D3; - color: black; - text-align: center; -} -*/ \ No newline at end of file diff --git a/yaksh/templates/yaksh/quiz.html b/yaksh/templates/yaksh/quiz.html index 3240244..156a2b1 100644 --- a/yaksh/templates/yaksh/quiz.html +++ b/yaksh/templates/yaksh/quiz.html @@ -22,7 +22,7 @@
- +