-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move cached data from body to seq_content #20
Move cached data from body to seq_content #20
Conversation
Previously, some future update or rogue script could easily tamper with our cached data attributes on the body element. We moved these data attributes to be slightly less widely accessible.
Changes Unknown when pulling f8dcce1 on potsui:change-cache-selector into ** on Stanford-Online:master**. |
@@ -6,6 +6,7 @@ function SubmitAndCompareXBlockInitView(runtime, element) { | |||
var publishUrl = runtime.handlerUrl(element, 'publish_event'); | |||
|
|||
var $element = $(element); |
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.
can you add a separate commit that outdents these two variable definitions?
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.
@caesar2164 Why?
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.
cause those two are weirdly indented?
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.
Oh, weird. It looks fine here, but is off on other views.
It looks like the original author (someone at OLI)
used hard-tabs there.
If @potsui wants to include it as a separate commit, that's fine.
If not, we can merge without though.
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.
Please bump patch version of xblock (in this xblock I think it's only in setup.py
, @caseylitton ?).
Killer! |
Changes Unknown when pulling 1a1f1bc on potsui:change-cache-selector into ** on Stanford-Online:master**. |
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.
+1
@stvstnfrd @caesar2164 PR for moving cached data out of
<body>
Previously, some future update or rogue script could easily tamper with
our cached data attributes on the body element. We moved these data
attributes to be slightly less widely accessible.
Arose from our convo w/ free text response: Stanford-Online/xblock-free-text-response#21
Trello: https://trello.com/c/QB46SgTN/954-move-cached-data-from-body-element-to-seqcontent-for-submit-and-compare-xblcok
CC @jspayd @jlikhuva