diff --git a/src/main/webapp/app/view/Question.js b/src/main/webapp/app/view/Question.js index aa8f52f83afa893633def0a5c2135b5f28fc6b6a..535bdcbdc7d6d12be051b8931266d046f1d704ec 100755 --- a/src/main/webapp/app/view/Question.js +++ b/src/main/webapp/app/view/Question.js @@ -640,6 +640,9 @@ Ext.define('ARSnova.view.Question', { saveGridQuestionHandler: function (grid) { var me = this; + if (this.grid.getChosenFields().length === 0) { + return; + } Ext.Msg.confirm('', Messages.SUBMIT_ANSWER, function (button) { if (button !== 'yes') { return; @@ -664,7 +667,9 @@ Ext.define('ARSnova.view.Question', { mcAbstentionHandler: function () { var me = this; - me.answerList.deselectAll(); + if (me.answerList) { + me.answerList.deselectAll(); + } Ext.Msg.confirm('', Messages.SUBMIT_ANSWER, function (button) { if (button !== 'yes') { return; @@ -672,7 +677,7 @@ Ext.define('ARSnova.view.Question', { me.getUserAnswer().then(function (answer) { answer.set('abstention', true); - me.answerList.deselectAll(); + answer.set('answerText', null); me.saveAnswer(answer); }); diff --git a/src/main/webapp/app/view/user/QuestionPanel.js b/src/main/webapp/app/view/user/QuestionPanel.js index 272500ca289447ba35d9e2933a1775378cb251b1..0f41ccd42b6ffed370254ee67e2c5f4d703b4e6a 100644 --- a/src/main/webapp/app/view/user/QuestionPanel.js +++ b/src/main/webapp/app/view/user/QuestionPanel.js @@ -345,7 +345,7 @@ Ext.define('ARSnova.view.user.QuestionPanel', { return; } - if (questionObj.isAbstentionAnswer && "mc" !== questionObj.questionType) { + if (questionObj.isAbstentionAnswer && ["mc", "grid"].indexOf(questionObj.questionType) === -1) { questionPanel.selectAbstentionAnswer(); questionPanel.disableQuestion(); return;