Commit 73322a5e by Piotr Mitros

Capa problems handle case sensitivity and give better errors

--HG--
branch : pmitros-capa-fixes
parent 0807cf81
......@@ -13,11 +13,15 @@ function ${ id }_load() {
postJSON('/modx/problem/${ id }/problem_check',
submit_data,
function(json) {
if(json['success'] == 'syntax')
alert('Syntax error');
else
${ id }_load();
switch(json.success) {
case 'incorrect': // Worked, but answer not
case 'correct':
${ id }_load();
//alert("!!"+json.success);
break;
default:
alert(json.success);
}
});
log_event('problem_check', submit_data);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment