-
Notifications
You must be signed in to change notification settings - Fork 50
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
fix: use usage_key instead of block_id as location identifier for scorm data #71
fix: use usage_key instead of block_id as location identifier for scorm data #71
Conversation
332719d
to
9fb3da0
Compare
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.
@Danyal-Faheem I think we should avoid uploading of content file it does not make sense to extract old package when course is imported. I think in case of course import scorm package should become unavailable in new course whereas in previous course it should work fine.
openedxscorm/scormxblock.py
Outdated
@@ -300,6 +319,17 @@ def studio_submit(self, request, _suffix): | |||
package_file = request.params["file"].file | |||
self.update_package_meta(package_file) | |||
|
|||
# First, save scorm file in the storage for later use |
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'm not getting the usage of this code. Why we need this?
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.
This code was for uploading and saving the content file at the storage backend. However, if we don't need to save the file this isn't required anymore.
@ziafazal okay, I will remove the code for saving the content file and just fix the path then. |
This is because block_id is maintained across course export/import Both the courses try to access the same data on storage Manipulating data in one course will overwrite the data for the other one, breaking it
9fb3da0
to
557d132
Compare
This is because block_id is maintained across course export/import Both the courses try to access the same data on storage Manipulating data in one course will overwrite the data for the other one, breaking it
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.
👍
…rm data (#71) * fix: use usage_key instead of block_id as location identifier This is because block_id is maintained across course export/import Both the courses try to access the same data on storage Manipulating data in one course will overwrite the data for the other one, breaking it
Fixes #70.
Changes
Caveats
studio_submit()
is called again.