This repository has been archived by the owner on May 11, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
address @spicyj's review comments for on-demand parsing of script + s…
…tyle: always empty style tag for dynamically-loaded exercises in makeProblem
- Loading branch information
188b2dc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you store the style for the original exercise anywhere?
188b2dc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good observation. :)
For summatives, we always load all exercises with
loadExercise
, so that's fine. For review mode, it's a bit of a hack: we don't store the style for the original exercise, but we will callloadExercise
to load it again anyway if it comes up, because the original exercise's element doesn't have.data('name')
, which we use inmaybeEnqueueReviewExercises
to determine which exercises are loaded. Yeah, pretty gross implicit dependencies. :(It's probably better to just always store the style and script tags for the original exercise, but I haven't bothered yet.