I’am using ironwood release from bitnami distribution
Git say it is edx-platform on 441d6384ee (grafted, tag: open-release/ironwood.2, origin/open-release/ironwood.master, origin/nedbat/test/i.2.2)
Me and my colleagues in university faced a problem what XBlock location ID’s is not unique around the edX which led to:
- If in all xblocks with same id was uploaded SCORM zip, all courses points to same directory
- If we replace one zip to another in one course, previously unpacked zip removes and and links to it in another courses becomes broken
Let me illustrate
(edxapp) root@debian:~# find /opt/bitnami/apps/edx/var/media/ -name 600508e8d34041a4b59e4b1a4c5f3b4a
We see what we have xblock with id 600508e8d34041a4b59e4b1a4c5f3b4a collision in 4 courses
Let’s see what scorm zip files we have in corresponding xblocks in this courses
ls -l /opt/bitnami/apps/edx/var/media/MyDemoCollege/Bio_3/scorm/600508e8d34041a4b59e4b1a4c5f3b4a
ls -l /opt/bitnami/apps/edx/var/media/MyDemoCollege/Bio_4/scorm/600508e8d34041a4b59e4b1a4c5f3b4a
ls -l /opt/bitnami/apps/edx/var/media/MyDemoCollege/Bio_2/scorm/600508e8d34041a4b59e4b1a4c5f3b4a
ls -l /opt/bitnami/apps/edx/var/media/MyDemoCollege/Bio_1/scorm/600508e8d34041a4b59e4b1a4c5f3b4a
Let’s see what we have in dir where zip files extracted:
ls -l /opt/bitnami/apps/edx/var/media/scorm/600508e8d34041a4b59e4b1a4c5f3b4a
And the problem is all this directories is wiped except the latest 792965ef48d6dd6c29a18d8108605b689c8baa0b
Because course maker uploaded scorm zip 792965ef48d6dd6c29a18d8108605b689c8baa0b.zip
in course Bio_3
in block 600508e8d34041a4b59e4b1a4c5f3b4a
and when he did it, previously extracted zips in
was removed. But another courses still point to them!
Sorry for so long description but actually my question is: Is it a bug if xblocks from different courses have same id?
If it is not a bug how you can recommend to solve a problem with erasing unpacked scorms?
I can just comment out corresponding line of code in scormxblock.py but I’am afraid to broke everything by doing it.
# Then, extract zip file if default_storage.exists(self.extract_folder_base_path): logger.info( 'Removing previously unzipped "%s"', self.extract_folder_base_path ) recursive_delete(self.extract_folder_base_path)