Commit 2aaad1b0 authored by jtimotei's avatar jtimotei

Fix delete feedback when deleting MC options

parent ae52becc
Pipeline #18859 passed with stages
in 4 minutes and 8 seconds
......@@ -465,9 +465,10 @@ class Exams extends React.Component {
return api.del('mult-choice/' + option.id)
.then(res => {
let feedback = widget.problem.feedback[index]
let indexFb = widget.problem.feedback.findIndex(e => { return e.id === option.feedback_id })
let feedback = widget.problem.feedback[indexFb]
feedback.deleted = true
this.updateFeedbackAtIndex(feedback, widget, index)
this.updateFeedbackAtIndex(feedback, widget, indexFb)
return new Promise((resolve) => {
this.setState((prevState) => {
return {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment