summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorankitjavalkar2019-09-27 15:45:00 +0530
committerGitHub2019-09-27 15:45:00 +0530
commit0790b69b8ed38088c0225bb30152246c4ae62ea6 (patch)
tree43ac137550bcd2b9f862d1ab9d28d30dea717376
parent8c4353a18dd73e890cdc35cb3b618badc3602b61 (diff)
parent52abccc4ca76c6f95bf41a7d1fc0b5ae258f5328 (diff)
downloadonline_test-0790b69b8ed38088c0225bb30152246c4ae62ea6.tar.gz
online_test-0790b69b8ed38088c0225bb30152246c4ae62ea6.tar.bz2
online_test-0790b69b8ed38088c0225bb30152246c4ae62ea6.zip
Merge pull request #627 from ankitjavalkar/course-download-clean
Move all download related templates to a new subfolder and add homepage link to navbar logo
-rw-r--r--yaksh/models.py13
-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>