Skip to content

Step Builder: Fix JS error that causes crash if no review step is present - #88

Merged
itsjeyd merged 1 commit into
masterfrom
fix-no-review-step
Oct 29, 2015
Merged

Step Builder: Fix JS error that causes crash if no review step is present#88
itsjeyd merged 1 commit into
masterfrom
fix-no-review-step

Conversation

@itsjeyd

@itsjeyd itsjeyd commented Oct 28, 2015

Copy link
Copy Markdown
Member

No description provided.

@bradenmacdonald

Copy link
Copy Markdown
Member

👍 Works for me.

If you have time though, I think this could be cleaned up a bit more: gradeDOM could be owned by the review step JS rather than the step builder JS. Also, gradeDOM does not need to be a DOM element at all, since it is invisible. It's only used as a hack for passing grade data to the JS. A better way would be to pass the grade data as the second argument to fragment.initialize_js('MentoringWithStepsBlock', data={'grade': self.get_grade()}) and then store the data in a JavaScript data structure owned by the review step JS code.

itsjeyd added a commit that referenced this pull request Oct 29, 2015
Step Builder: Fix JS error that causes crash if no review step is present
@itsjeyd
itsjeyd merged commit 5b75184 into master Oct 29, 2015
itsjeyd referenced this pull request Nov 12, 2015
Also includes a drive-by fix that makes integration tests for plot
blocks more robust.
@xitij2000
xitij2000 deleted the fix-no-review-step branch December 13, 2019 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants