Fix relation between MultipleChoiceOption and FeedbackOption
When a MultipleChoiceOption is created via the API call PUT /mult-choice, a new FeedbackOption is now automatically inserted into the database that links to the same problem as the MultipleChoiceOption.
The response of PUT /mult-choice will now contain an mc_id that shows the ID of the new MultipleChoiceQuestion and a feedback_id with the ID of the new FeedbackOption.
The relation between MultipleChoiceOption and Problem is now removed. A new relation from FeedbackOption to MultipleChoiceOption is created. However, it is still possible to use problem.mc_options with a hybrid attribute that essentially runs a query in the background.
TODO:
-
Ensure that if a FeedbackOptionis deleted, the relatedMultipleChoiceOptionis also deleted.
Closes #35 (closed) and #36 (closed).
Edited by Ghost User