summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authorCruiseDevice2019-07-12 15:43:53 +0530
committerCruiseDevice2019-07-12 15:43:53 +0530
commit323e34a6755e794c0177afdb36cd931d25db3d77 (patch)
tree5ecb619f8b20787234b6c415b1d30550522fed7a /yaksh/models.py
parent745426ecc20bba58fd3721a960057ad8d41e3b99 (diff)
downloadonline_test-323e34a6755e794c0177afdb36cd931d25db3d77.tar.gz
online_test-323e34a6755e794c0177afdb36cd931d25db3d77.tar.bz2
online_test-323e34a6755e794c0177afdb36cd931d25db3d77.zip
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.
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py18
1 files changed, 13 insertions, 5 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"))