diff options
author | prathamesh | 2017-12-27 17:32:21 +0530 |
---|---|---|
committer | prathamesh | 2017-12-27 17:53:50 +0530 |
commit | 51a93b42b1d7b3a94e227796aa8d4f6e97de9929 (patch) | |
tree | db35061da2b9891dd597337be78946eb67c5df3c /yaksh/static | |
parent | b44db042059e69df4c4a948d6dff73604c7abf83 (diff) | |
download | online_test-51a93b42b1d7b3a94e227796aa8d4f6e97de9929.tar.gz online_test-51a93b42b1d7b3a94e227796aa8d4f6e97de9929.tar.bz2 online_test-51a93b42b1d7b3a94e227796aa8d4f6e97de9929.zip |
Exercise feature in video lessons
Exercise is same as quiz except for following differences:
- no time limit
- no marks weightage
- no instruction page
- skip denied for a particular time
An attribute 'is_exercise' in Quiz determines whether the quiz is
exercise or not.
Questions contains 'min_time' attribute.
For an exercise a question cannot be skipped for an allotted minimum
time, after which either django or JavaScript makes Next button
available.
Implementation is as such due to complexity of our existing views and
templates.
Also, after min_time, same question with Next button is available to
move on, assuming that solution is present in the video.
Diffstat (limited to 'yaksh/static')
-rw-r--r-- | yaksh/static/yaksh/js/requesthandler.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/yaksh/static/yaksh/js/requesthandler.js b/yaksh/static/yaksh/js/requesthandler.js index 0663a55..f50570b 100644 --- a/yaksh/static/yaksh/js/requesthandler.js +++ b/yaksh/static/yaksh/js/requesthandler.js @@ -36,6 +36,10 @@ function unlock_screen() { document.getElementById("ontop").style.display = "none"; } +function show_skip() { + document.getElementById("skip_ex").style.visibility = "visible"; +} + function get_result(uid){ var url = "/exam/get_result/" + uid + "/" + course_id + "/" + module_id + "/"; ajax_check_code(url, "GET", "html", null, uid) @@ -104,6 +108,9 @@ function ajax_check_code(url, method_type, data_type, data, uid) { var global_editor = {}; $(document).ready(function(){ + if(is_exercise == "True" && can_skip == "False"){ + setTimeout(function() {show_skip();}, delay_time*1000); + } // Codemirror object, language modes and initial content // Get the textarea node var textarea_node = document.querySelector('#answer'); |