summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaheshgudi2016-05-13 18:19:34 +0530
committermaheshgudi2016-05-27 12:43:12 +0530
commitc69c414120f85ed61b62451bae3b806d93c52361 (patch)
tree19db6e14360010fc87a4d8db7ce0c4d410de277f
parent986e3e71b3ec858f2a7e603679c44a80fe3d4558 (diff)
downloadonline_test-c69c414120f85ed61b62451bae3b806d93c52361.tar.gz
online_test-c69c414120f85ed61b62451bae3b806d93c52361.tar.bz2
online_test-c69c414120f85ed61b62451bae3b806d93c52361.zip
added js function to alert user for prerequisites
-rw-r--r--yaksh/static/yaksh/js/add_quiz.js9
1 files changed, 9 insertions, 0 deletions
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