Duplication of MCQ/MRQ question without any options creates a new Course::Assessment::Question with a NULL actable id
cysjonathan opened this issue · 0 comments
cysjonathan commented
Effect
Visiting an assessment page which has a question with a null actable id causes the backend to error out and fail to load
To reproduce
- Create a new MCQ/MRQ question
- Save question with NO options
- Duplicate question (into same assessment, another assessment) or duplicate entire assessment (which cascade duplicates the question)
- Newly duplicated question is corrupted
Expected behaviour
a) MCQ/MRQ question should enforce AT LEAST 1 option exists
or
b) MCQ/MRQ question with NO options, on duplication, should create an MCQ/MRQ question with NO options
Bonus expected behaviour
(This might be a good enhancement in a separate PR instead.)
Decouple the assessment details payload with the questions list payload.
So the assessment page can still load first, even if the question list fails to load (or takes longer to load if there are a lot of questions)