diff options
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index c97a616..6881b4f 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -316,7 +316,7 @@ class Lesson(models.Model): lesson_file.file.name))) zip_file.writestr(filename, lesson_file.file.read()) unit_file_path = os.sep.join(( - path, "templates", "yaksh", "unit.html" + path, "templates", "yaksh", "download_course_templates", "unit.html" )) lesson_data = {"course": course, "module": module, "lesson": self, "next_unit": next_unit, @@ -576,7 +576,7 @@ class Quiz(models.Model): course_name, module_name, quiz_name )) unit_file_path = os.sep.join(( - path, "templates", "yaksh", "quiz.html" + path, "templates", "yaksh", "download_course_templates", "quiz.html" )) quiz_data = {"course": course, "module": module, "quiz": self, "next_unit": next_unit} @@ -812,7 +812,7 @@ class LearningModule(models.Model): path) module_file_path = os.sep.join(( - path, "templates", "yaksh", "module.html" + path, "templates", "yaksh", "download_course_templates", "module.html" )) module_data = {"course": course, "module": self, "units": units} write_templates_to_zip(zip_file, module_file_path, module_data, @@ -1079,7 +1079,12 @@ class Course(models.Model): with zipfile.ZipFile(zip_file_name, "a") as zip_file: course_name = self.name.replace(" ", "_") modules = self.get_learning_modules() - file_path = os.sep.join((path, "templates", "yaksh", "index.html")) + file_path = os.sep.join( + ( + path, "templates", "yaksh", + "download_course_templates", "index.html" + ) + ) write_static_files_to_zip(zip_file, course_name, path, static_files) course_data = {"course": self, "modules": modules} |