From c69c414120f85ed61b62451bae3b806d93c52361 Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Fri, 13 May 2016 18:19:34 +0530 Subject: added js function to alert user for prerequisites --- yaksh/static/yaksh/js/add_quiz.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/yaksh/static/yaksh/js/add_quiz.js b/yaksh/static/yaksh/js/add_quiz.js index 184881c..e212b70 100644 --- a/yaksh/static/yaksh/js/add_quiz.js +++ b/yaksh/static/yaksh/js/add_quiz.js @@ -9,3 +9,12 @@ function test() document.getElementById("submit").innerHTML = "Save"; } } + +function usermode(location) +{ + var select = document.getElementById("id_prerequisite"); + var select_text = select.options[select.selectedIndex].text; + window.alert(select_text + " is a prerequisite for this course.\n \ + You are still allowed to attempt this quiz.") + window.location.replace(location); +} \ No newline at end of file -- cgit