From f5ef323d03dd80e1ae00f306ac44f5ee3efb3e7c Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Mon, 1 Jul 2013 11:56:32 +0530 Subject: edited JS to give a msg when the answer is correct --- testapp/static/exam/js/add_question.js | 4 +--- testapp/static/exam/js/add_quiz.js | 1 - testapp/static/exam/js/edit_question.js | 4 ---- 3 files changed, 1 insertion(+), 8 deletions(-) (limited to 'testapp/static') diff --git a/testapp/static/exam/js/add_question.js b/testapp/static/exam/js/add_question.js index ab27dc0..a77e392 100644 --- a/testapp/static/exam/js/add_question.js +++ b/testapp/static/exam/js/add_question.js @@ -139,9 +139,7 @@ function textareaformat() $('#id_snippet').bind('blur', function( event ){ document.getElementById("id_snippet").rows=1; document.getElementById("id_snippet").cols=40; - $('#id_snippet').val("#To avoid indentation errors use tabs for indentation for Python questions"); - }); - + }); $('#id_type').bind('change',function(event){ var value = document.getElementById('id_type').value; if(value == 'mcq') diff --git a/testapp/static/exam/js/add_quiz.js b/testapp/static/exam/js/add_quiz.js index 56b0e95..d5688a8 100644 --- a/testapp/static/exam/js/add_quiz.js +++ b/testapp/static/exam/js/add_quiz.js @@ -2,7 +2,6 @@ function test() { if (document.getElementById("id_description").value != "") { - alert("reached condition"); document.getElementById("submit").innerHTML = "Save"; } } diff --git a/testapp/static/exam/js/edit_question.js b/testapp/static/exam/js/edit_question.js index 023b654..2cf304c 100644 --- a/testapp/static/exam/js/edit_question.js +++ b/testapp/static/exam/js/edit_question.js @@ -154,10 +154,6 @@ function textareaformat() this.rows = 5; $(snippet_id).val(""); }); - $(snippet_id).bind('blur',function(event){ - this.rows = 1; - $(snippet_id).val("#To avoid indentation errors use tab for indentation for Python questions"); - }); $(snippet_id).bind('keydown', function (event){ catchTab(snippet_id,event); }); -- cgit From 754244da53f7e0a63c272ce6d1ffb15c1d5be0ae Mon Sep 17 00:00:00 2001 From: prathamesh Date: Mon, 8 Jul 2013 11:22:01 +0530 Subject: Added few questions. Made changes to fix minor bugs which were found during testing. --- testapp/static/exam/js/add_question.js | 5 ----- testapp/static/exam/js/edit_question.js | 2 -- 2 files changed, 7 deletions(-) (limited to 'testapp/static') diff --git a/testapp/static/exam/js/add_question.js b/testapp/static/exam/js/add_question.js index e001ee7..ba17492 100644 --- a/testapp/static/exam/js/add_question.js +++ b/testapp/static/exam/js/add_question.js @@ -77,10 +77,6 @@ function textareaformat() document.getElementById('id_points').setAttribute('class','mini-text'); document.getElementById('id_tags').setAttribute('class','tag-text'); - jQuery().ready(function() - { - $("#id_snippet").val("#To avoid indentation errors use tabs for indentation for Python questions"); - }); $('#id_snippet').bind('keydown', function( event ){ if(navigator.userAgent.match("Gecko")) @@ -135,7 +131,6 @@ function textareaformat() $('#id_snippet').bind('focus', function( event ){ document.getElementById("id_snippet").rows=5; document.getElementById("id_snippet").cols=40; - $('#id_snippet').val(""); }); $('#id_snippet').bind('blur', function( event ){ document.getElementById("id_snippet").rows=1; diff --git a/testapp/static/exam/js/edit_question.js b/testapp/static/exam/js/edit_question.js index a5d4e2b..28d95f9 100644 --- a/testapp/static/exam/js/edit_question.js +++ b/testapp/static/exam/js/edit_question.js @@ -152,7 +152,6 @@ function textareaformat() var snippet_id = document.getElementById('id_snippet'+i); $(snippet_id).bind('focus',function(event){ this.rows = 5; - $(snippet_id).val(""); }); $(snippet_id).bind('keydown', function (event){ catchTab(snippet_id,event); @@ -170,7 +169,6 @@ function textareaformat() jQuery().ready(function() { jQuery("#id_tags" + i).autocomplete("/taggit_autocomplete_modified/json", { multiple: true }); - $(snippet_id).val("#To avoid indentation errors use tab for indentation for Python questions"); }); } } -- cgit