Commit 60fee331 authored by Hidde Leistra's avatar Hidde Leistra

Fix feedback options breaking the exam page (See note)

This still crashes on problem deletion, but fixes regular use.
You can also switch exams and everything.
parent 5be891b0
......@@ -42,7 +42,8 @@ class Exams extends React.Component {
id: problem.id,
page: problem.page,
name: problem.name,
graded: problem.graded
graded: problem.graded,
feedback: problem.feedback || []
}
}
})
......@@ -323,7 +324,6 @@ class Exams extends React.Component {
onBlur={(e) => {
props.saveProblemName(e.target.value)
}} />
{this.state.editActive
? <EditPanel problemID={props.problem.id} feedback={this.state.feedbackToEdit}
goBack={this.backToFeedback} />
......
......@@ -86,7 +86,8 @@ class ExamEditor extends React.Component {
if (selectionBox.width >= this.props.problemMinWidth && selectionBox.height >= this.props.problemMinHeight) {
const problemData = {
name: 'New problem', // TODO: Name
page: this.props.page
page: this.props.page,
feedback: []
}
const widgetData = {
x: Math.round(selectionBox.left),
......
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