-
Notifications
You must be signed in to change notification settings - Fork 51
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
feat: generalize proxy assets for use with every storage #91
feat: generalize proxy assets for use with every storage #91
Conversation
We do this so that custom storage does not need to be defined for Scorm The default storage configured for Open edX should work out of the box with scorm now This also fixes an issue of X-Frame-Options on the LMS when running in development mode closes overhangio#87
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.
I have one question and a style suggestion, but otherwise this looks great! And I was able to use it to set up a scorm xblock in devstack with no trouble.
@@ -765,7 +764,7 @@ def find_file_path(self, filename): | |||
Search recursively in the extracted folder for a given file. Path of the first | |||
found file will be returned. Raise a ScormError if file cannot be found. | |||
""" | |||
path = self.get_file_path(filename, self.extract_folder_path) | |||
path = self.get_file_path(filename, self.extract_folder_path) or self.get_file_path(filename, self.extract_folder_base_path) |
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.
Is this part needed for generalizing asset serving? (Not entirely sure what the effect of this line is.) It looks like it would fall back to searching across all upload-versions of the same scorm xblock.
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.
We need this for backwards compatibility as older versions of scorm would store files in the base path. We also need this as we have modified the index_page_url
property.
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.
I see, thanks! And find_file_path
is now invoked from assets_proxy
.
* feat: generalize proxy assets for use with every storage We do this so that custom storage does not need to be defined for Scorm The default storage configured for Open edX should work out of the box with scorm now This also fixes an issue of X-Frame-Options on the LMS when running in development mode closes overhangio#87 Co-authored-by: Tim McCormack <tmccormack@edx.org> --------- Co-authored-by: Tim McCormack <tmccormack@edx.org>
Closes #87