Commit ef42fbae authored by Robert Czechowski's avatar Robert Czechowski
Browse files

Enhance fioi task wrapper 'wrapper.html' to save task answer only if it has...

Enhance fioi task wrapper 'wrapper.html' to save task answer only if it has been changed from the previous saved answer
parent 25b1a2e7
......@@ -79,13 +79,23 @@ function getTaskProxyCallback(task) {
task.load(myLoadViews, loadCallback, ec("task.load"))
}
var previous_answer = "";
function getAnswerCallback(answer) {
// If the answer did not change since last save, there is nothing to do
if (answer == previous_answer) {
return;
}
console.log("In task.gradeAnswer callback:");
console.log(answer);
function gradeAnswerCallback(score, message, scoreToken){
function save_task_callback() {
console.log("OK transmission");
// Now we know that the answer has been saved
previous_answer = answer;
};
function save_task_error() {
console.log("ERROR transmission");
......
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