I am fixing a bug in this code. In some scenarios responseObj is null and says that
responseObj is not defined
Backend of this application is written in perl. Can anyone give a solution or any suggestion?
function handleGiveUp(part) {
if (!confirm("Are you sure you want to request the answer to this question? If you do, you will not get any credit for it.")) {
return;
}
var ioArgs = {
action: 'showAnswer',
assignmentProblemID: part.parent.config.assignmentProblemID,
partID: part.id,
noErrorAlertOnSuccess: true,
aCSRFToken: MxData.aCSRFToken
};
shieldedSubmitServerCall(part, ioArgs, {
onSuccess: function(responseObj) {
processShowAnswer(part, responseObj.data);
}
function handleGiveUp(part) {
if (!confirm("Are you sure you want to request the answer to this question? If you do, you will not get any credit for it.")) {
return;
}
var ioArgs = {
action: 'showAnswer',
assignmentProblemID: part.parent.config.assignmentProblemID,
partID: part.id,
noErrorAlertOnSuccess: true,
aCSRFToken: MxData.aCSRFToken
};
shieldedSubmitServerCall(part, ioArgs, {
onSuccess: function(responseObj) {
processShowAnswer(part, responseObj.data);
}
});
}
});
}