Commit 2ec91651 authored by Andreas Gärtner's avatar Andreas Gärtner
Browse files

Task #15865: Reset question round state on answer deletion.

parent 4d0c28eb
......@@ -220,7 +220,7 @@ Ext.define('ARSnova.view.speaker.AudienceQuestionPanel', {
Ext.Msg.confirm(Messages.DELETE_ALL_ANSWERS_REQUEST, Messages.ALL_QUESTIONS_REMAIN, function (answer) {
if (answer === 'yes') {
me.getController().deleteAllQuestionsAnswers({
success: Ext.bind(this.handleAnswerCount, this),
success: Ext.bind(this.handleDeleteAnswers, this),
failure: Ext.emptyFn
});
}
......@@ -389,6 +389,15 @@ Ext.define('ARSnova.view.speaker.AudienceQuestionPanel', {
return promises;
},
handleDeleteAnswers: function () {
this.handleAnswerCount();
this.questionStore.each(function (question) {
question.set("votingDisabled", false);
question.raw.votingDisabled = false;
});
},
handleAnswerCount: function () {
RSVP.all(this.getQuestionAnswers())
.then(Ext.bind(this.caption.explainBadges, this.caption))
......
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