summaryrefslogtreecommitdiff
path: root/testapp/yaksh/static/yaksh_app/js/add_questionpaper.js
diff options
context:
space:
mode:
Diffstat (limited to 'testapp/yaksh/static/yaksh_app/js/add_questionpaper.js')
-rw-r--r--testapp/yaksh/static/yaksh_app/js/add_questionpaper.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/testapp/yaksh/static/yaksh_app/js/add_questionpaper.js b/testapp/yaksh/static/yaksh_app/js/add_questionpaper.js
new file mode 100644
index 0000000..6185dd5
--- /dev/null
+++ b/testapp/yaksh/static/yaksh_app/js/add_questionpaper.js
@@ -0,0 +1,25 @@
+function load_data()
+{
+ var url_root = document.getElementById('url_root').value;
+ var value = document.getElementById('mode').value;
+ var pathArray = window.location.pathname.split( '/' );
+ length = pathArray.length;
+ var digit = parseInt(pathArray[length-2]);
+
+ if (! isNaN(digit) && value == 'Automatic')
+ {
+ window.location = url_root + "/exam/manage/designquestionpaper/automatic/" + digit;
+ }
+ else if(!isNaN(digit) && value == 'Manual')
+ {
+ window.location = url_root + "/exam/manage/designquestionpaper/manual/" + digit;
+ }
+ else if(value == 'Automatic')
+ {
+ window.location = window.location.pathname + "automatic";
+ }
+ else if( value == 'Manual')
+ {
+ window.location = window.location.pathname + "manual";
+ }
+}