summaryrefslogtreecommitdiff
path: root/yaksh/static
diff options
context:
space:
mode:
authorPrabhu Ramachandran2017-03-20 18:51:57 +0530
committerGitHub2017-03-20 18:51:57 +0530
commita522432ae637c029368f22ccb407089ed34e231e (patch)
treeb7646d505ad79d4dc80d9c49521995c84fe50dc1 /yaksh/static
parent6a09816d66f9f24c0dba275d0dd3aaf7289eb73b (diff)
parente0beba1dacb0d5de5ca8b59298345eb9d841d879 (diff)
downloadonline_test-a522432ae637c029368f22ccb407089ed34e231e.tar.gz
online_test-a522432ae637c029368f22ccb407089ed34e231e.tar.bz2
online_test-a522432ae637c029368f22ccb407089ed34e231e.zip
Merge pull request #252 from adityacp/assignment_upload_check
Assignment upload Evaluation
Diffstat (limited to 'yaksh/static')
-rw-r--r--yaksh/static/yaksh/js/add_question.js36
1 files changed, 27 insertions, 9 deletions
diff --git a/yaksh/static/yaksh/js/add_question.js b/yaksh/static/yaksh/js/add_question.js
index 8ca22eb..05752b4 100644
--- a/yaksh/static/yaksh/js/add_question.js
+++ b/yaksh/static/yaksh/js/add_question.js
@@ -111,16 +111,34 @@ function textareaformat()
});
- $('#id_type').bind('focus', function(event){
- var type = document.getElementById('id_type');
- type.style.border = '1px solid #ccc';
- });
+ $('#id_type').bind('focus', function(event){
+ var type = document.getElementById('id_type');
+ type.style.border = '1px solid #ccc';
+ });
+
+ $('#id_language').bind('focus', function(event){
+ var language = document.getElementById('id_language');
+ language.style.border = '1px solid #ccc';
+ });
+ document.getElementById('my').innerHTML = document.getElementById('id_description').value ;
- $('#id_language').bind('focus', function(event){
- var language = document.getElementById('id_language');
- language.style.border = '1px solid #ccc';
- });
- document.getElementById('my').innerHTML = document.getElementById('id_description').value ;
+
+ if (document.getElementById('id_grade_assignment_upload').checked ||
+ document.getElementById('id_type').val() == 'upload'){
+ $("#id_grade_assignment_upload").prop("disabled", false);
+ }
+ else{
+ $("#id_grade_assignment_upload").prop("disabled", true);
+ }
+
+ $('#id_type').change(function() {
+ if ($(this).val() == "upload"){
+ $("#id_grade_assignment_upload").prop("disabled", false);
+ }
+ else{
+ $("#id_grade_assignment_upload").prop("disabled", true);
+ }
+ });
}
function autosubmit()