diff options
-rw-r--r-- | yaksh/models.py | 18 | ||||
-rw-r--r-- | yaksh/static/yaksh/css/offline.css | 12 | ||||
-rw-r--r-- | 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 @@ </div> </nav> <div class="container" style="margin-top:50px"> - + <div class="row"> <nav class="col-md-2 d-none d-md-block bg-light sidebar"> <div class="sidebar-sticky"> @@ -74,7 +74,7 @@ <br> <div class="text-center"> <!-- Change Yaksh TODO --> - <a class="btn btn-success" href="http://127.0.0.1:8000/exam/start/{{quiz.questionpaper_set.get.id}}/{{module.id}}/{{course.id}}" target="_blank">{{quiz.description}}</a> + <a class="btn btn-success" href="http://yaksh.fossee.in/exam/start/{{quiz.questionpaper_set.get.id}}/{{module.id}}/{{course.id}}" target="_blank">{{quiz.description}}</a> {% if next_unit.type == 'lesson' %} <a class="btn btn-info" href="../{{next_unit.lesson.name|replace_spaces}}/{{next_unit.lesson.name|replace_spaces}}.html"> Next @@ -111,4 +111,4 @@ $(document).ready(function(){ } }); </script> -</html>
\ No newline at end of file +</html>
\ No newline at end of file |