We're updating the issue view to help you get more done. 

IV: DT w instant feedback and save content state crashes whole IV

Description

1) Create IV w DT that has instant feedback
2) Enable Save Content State
3) Go to the DT and drag one draggable incorrectly (no buttons should be showing)
4) Refresh IV and observe that the IV crashes with the following JS error:

SCRIPT5007: Unable to get property '$element' of undefined or null reference
question.js (967,9)

Full stacktrace:
[Main Thread]
self.removeFeedback [Line: 967, Col: 9], question.js
n.prototype.hideEvaluation [Line: 1, Col: 14891], h5p-drag-text.js
n.prototype.showEvaluation [Line: 1, Col: 14159], h5p-drag-text.js
n.prototype.setH5PUserState [Line: 1, Col: 22496], h5p-drag-text.js
n.prototype.initDragText [Line: 1, Col: 9654], h5p-drag-text.js

Failing line:
sections.buttons.$element.removeClass('feedback-shown');
in question.js

Environment

IE11, Drupal

Acceptance Criteria

1) No JS error when resuming state for DT in IV when DT has the "instant feedback" option enabled.

Status

Assignee

Thomas Marstrander

Reporter

Thomas Marstrander

Funding

None

Code reviewer

Timothy Lim

Released

Released

Fix versions

Priority

High