Skip to content

Prevent empty answer-options from being displayed during the quiz.

Tobias Brähler requested to merge tbrh66/arsnova.click:Bugfix-Branch into staging

DESCRIPTION OF BUGFIX

While creating questions and answers one might not use all 4 default answer-options. Of course, reducing the possible answer-options to a suitable amount would be a solution. However, the placeholder-text ("Antwortoption oder lass leer") might suggest that this is not necessary. As a consequence, empty and unnecessary answer-options are displayed all over the quiz (see picture below).

Luckily, this Bugfix resolves the problem: After finishing the question/answers - creation a new method checks if there are answer-options with no text. All empty answer-options will consequently be deleted from database and local storage to prevent the rendering of empty and therefore unnecessary answer-options during the quiz.

UPDATE: At least one answer remains even if all answers are empty. This is necessary as the app depends on the existence of at least one answer-option for correct functioning.


Bugfix_empty_answer-options

Merge request reports