diff options
author | ankitjavalkar | 2019-08-19 12:51:39 +0530 |
---|---|---|
committer | ankitjavalkar | 2019-08-19 12:51:39 +0530 |
commit | 52abccc4ca76c6f95bf41a7d1fc0b5ae258f5328 (patch) | |
tree | 922a2617ea92188acdb3425626fc0398b35f66d2 /yaksh | |
parent | f977eb246efd835d041837378bb13778ae3037f9 (diff) | |
download | online_test-52abccc4ca76c6f95bf41a7d1fc0b5ae258f5328.tar.gz online_test-52abccc4ca76c6f95bf41a7d1fc0b5ae258f5328.tar.bz2 online_test-52abccc4ca76c6f95bf41a7d1fc0b5ae258f5328.zip |
Move all download related templates to a new subfolder and add homepage link to navbar logo
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/models.py | 13 | ||||
-rw-r--r-- | yaksh/templates/yaksh/download_course_templates/index.html (renamed from yaksh/templates/yaksh/index.html) | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/download_course_templates/module.html (renamed from yaksh/templates/yaksh/module.html) | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/download_course_templates/quiz.html (renamed from yaksh/templates/yaksh/quiz.html) | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/download_course_templates/unit.html (renamed from yaksh/templates/yaksh/unit.html) | 2 |
5 files changed, 13 insertions, 8 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} diff --git a/yaksh/templates/yaksh/index.html b/yaksh/templates/yaksh/download_course_templates/index.html index 90a05fe..4b76e85 100644 --- a/yaksh/templates/yaksh/index.html +++ b/yaksh/templates/yaksh/download_course_templates/index.html @@ -12,7 +12,7 @@ <nav class="navbar bg-dark navbar-dark"> <div class="container-fluid"> <div class="navbar-header"> - <a class="navbar-brand" href="#"> + <a class="navbar-brand" href="../../index.html"> <img src="static/images/yaksh_banner.png" alt="YAKSH"> </img> </a> diff --git a/yaksh/templates/yaksh/module.html b/yaksh/templates/yaksh/download_course_templates/module.html index b062159..039eac2 100644 --- a/yaksh/templates/yaksh/module.html +++ b/yaksh/templates/yaksh/download_course_templates/module.html @@ -11,7 +11,7 @@ <nav class="navbar bg-dark navbar-dark"> <div class="container-fluid"> <div class="navbar-header"> - <a class="navbar-brand" href="#"> + <a class="navbar-brand" href="../../index.html"> <img src="../static/images/yaksh_banner.png" alt="YAKSH"> </img> </a> diff --git a/yaksh/templates/yaksh/quiz.html b/yaksh/templates/yaksh/download_course_templates/quiz.html index 156a2b1..48bc12e 100644 --- a/yaksh/templates/yaksh/quiz.html +++ b/yaksh/templates/yaksh/download_course_templates/quiz.html @@ -14,7 +14,7 @@ <nav class="navbar bg-dark navbar-dark fixed-top"> <div class="container-fluid"> <div class="navbar-header"> - <a class="navbar-brand" href="#"> + <a class="navbar-brand" href="../../index.html"> <img src="../../static/images/yaksh_banner.png" alt="YAKSH"> </img> </a> diff --git a/yaksh/templates/yaksh/unit.html b/yaksh/templates/yaksh/download_course_templates/unit.html index 45092a6..7e618c7 100644 --- a/yaksh/templates/yaksh/unit.html +++ b/yaksh/templates/yaksh/download_course_templates/unit.html @@ -14,7 +14,7 @@ <nav class="navbar bg-dark navbar-dark fixed-top"> <div class="container-fluid"> <div class="navbar-header"> - <a class="navbar-brand" href="#"> + <a class="navbar-brand" href="../../index.html"> <img src="../../static/images/yaksh_banner.png" alt="YAKSH"> </img> </a> |