summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
authorCruiseDevice2019-07-12 15:43:53 +0530
committerCruiseDevice2019-07-12 15:43:53 +0530
commit323e34a6755e794c0177afdb36cd931d25db3d77 (patch)
tree5ecb619f8b20787234b6c415b1d30550522fed7a /yaksh
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')
-rw-r--r--yaksh/models.py18
-rw-r--r--yaksh/static/yaksh/css/offline.css12
-rw-r--r--yaksh/templates/yaksh/quiz.html6
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