Several smaller issues in multiple choice data in the backend

Currently, the code that handles multiple choice question checkbox data has multiple bugs.

  • The table MultipleChoiceOption stores both a Problem and a FeedbackOption, which in principle allows the database to become inconsistent (when the FeedbackOption of a MultipleChoiceOption does not belong to the problem of the MultipleChoiceQuestion). The solution is to only refer to the FeedbackOption.
  • The page of a MultipleChoiceOption should be the same as page of a ProblemWidget that should always relate to a Problem.
  • When inserting a multiple choice option via the API by using PUT /mult-choice/<id>, the id should be optional when the data of a checkbox is first inserted.
  • When calling the GET /mult-choice/<id>, not all data is sent as a response.
Edited by Ghost User