SmartZoos / Toolset

Gaming platform for SmartZoos project
MIT License
0 stars 1 forks source link

Should not be possible to create multiple-choice questions with no correct answer(s) marked #53

Closed kaimikael closed 7 years ago

kaimikael commented 7 years ago

Currently it is possible to create activity items with multiple-choice questions, yet leave the correct answer unchosen. At item creation there should be a check that at least one alternative has been chosen, before accepting to save the item. (Also, it should not be possible to have empty options.)

pjotrsavitski commented 7 years ago

That is a correct point. This should also affect single-choice one. There is not protection, as of the moment.

I will add the validator required, so that it would not be possible to submit the form until conditions have been met (or the JS part does a quick check-up before doing the submission).

pjotrsavitski commented 7 years ago

The solution will be the same as with one correct answer at least one of the choices should be correct. If user manages to uncheck or remove last remaining correct choice. Then system will force-select the first one.