From 8e5354fb2fdab96780bfd147ba5b1724eebd673b Mon Sep 17 00:00:00 2001 From: adityacp Date: Tue, 21 Nov 2017 17:08:23 +0530 Subject: Change in templates, js, template tag - Add new template tag to fetch course module completion status - View all lessons/quizzes during quiz - Change button values - Change user mode and god mode --- yaksh/static/yaksh/js/add_quiz.js | 14 +------ yaksh/templates/exam.html | 11 ++++-- yaksh/templates/yaksh/add_module.html | 7 +++- yaksh/templates/yaksh/complete.html | 30 ++++++++------- yaksh/templates/yaksh/design_course_session.html | 3 ++ yaksh/templates/yaksh/intro.html | 2 +- yaksh/templates/yaksh/question.html | 48 +++++++++++++++++++++--- yaksh/templates/yaksh/quizzes_user.html | 24 +++++++++--- yaksh/templates/yaksh/show_video.html | 38 +++++++++++++------ yaksh/templatetags/custom_filters.py | 3 ++ yaksh/views.py | 10 ++--- 11 files changed, 131 insertions(+), 59 deletions(-) diff --git a/yaksh/static/yaksh/js/add_quiz.js b/yaksh/static/yaksh/js/add_quiz.js index f4067ed..57993ef 100644 --- a/yaksh/static/yaksh/js/add_quiz.js +++ b/yaksh/static/yaksh/js/add_quiz.js @@ -21,15 +21,5 @@ String.prototype.beginsWith = function (string) { function usermode(location) { - var select = document.getElementById("id_prerequisite"); - var select_text = select.options[select.selectedIndex].text; - if (select_text.beginsWith("----")){ - window.alert("No prerequisite for this course.\n \ - You can attempt the quiz."); - window.location.replace(location); - } else { - window.alert(select_text + " is a prerequisite for this course.\n \ - You are still allowed to attempt this quiz.") - window.location.replace(location); - } - } + window.location.replace(location); +} diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index 9b565eb..ce3bf44 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -15,7 +15,7 @@ Yaksh