Hi,
we have old native edX (Ironwood), which have 2 scorm xblocks:
openedx-scorm-xblock==10.0.1 (block_type=scorm) from https://github.com/overhangio/openedx-scorm-xblock
scormxblock-xblock==0.5 (block_type=scormxblock) from https://github.com/raccoongang/edx_xblock_scorm
We use both of them. So, before we upgrade our platform to Tutor, we need to migrate old scorm blocks (racoongang) to new (overhangio).
Let’s do it step by step
1. Mysql
Found scormxblock in 2 tables (db edxapp):
mysql> select * from completion_blockcompletion where block_type='scormxblock';
| created | modified | id | course_key | block_key | block_type | completion | user_id |
| 2021-11-03 07:44:51.705637 | 2021-11-03 07:44:51.705954 | 35688 | course-v1:222+333+444 | block-v1:222+333+444+type@scormxblock+block@d3b7ca87eba54c3e8f441d317f9e6904 | scormxblock |
mysql> select * from courseware_studentmodule where module_type='scormxblock';
| id | module_type | module_id | course_id | state | grade | max_grade | done | created | modified | student_id |
| 52568 | scormxblock | block-v1:222+333+444+type@scormxblock+block@9363f5479472483793e7dceb01451ab1 | course-v1:222+333+444 | {"lesson_status": "incomplete"} | NULL | NULL | na | 2021-11-02 12:48:27.213102 | 2021-11-02 12:48:27.213135 | 12 |
So, need to:
mysql> update completion_blockcompletion set block_type='scorm' where block_type='scormxblock';
mysql> update courseware_studentmodule set module_type='scorm' where module_type='scormxblock';
Besides, module_id and block_key need to be changed to use scorm instead of scormxblock in paths like block-v1:222+333+444+type@scormxblock+block@9363f5479472483793e7dceb01451ab1
===search for solution in progress===
2. Mongo
Found many of block_type=scormxblock (~1022) needed to be replaced to block_type=scorm
===search for solution in progress===
3. File store
We use django.core.files.storage.FileSystemStorage as default file storage.
So,
in /edx/var/edxapp/media/
both xblocks stores zip-files in
path/to/course/scormxblock/block_id/hash.zip (racoongang)
path/to/course/scorm/block_id/hash.zip (overhangio)
Maybe just copy block id’s in same courses from scormxblock to scorm folder?
Unpacked scorm stores like that:
[MEDIA_ROOT]/scorm/block_id/[index.html etc.] (racoongang)
[MEDIA_ROOT]/scorm/block_id/hash sha1/[index.html etc.] (overhangio)
So, we need to calculate every hash, make folder in scorm/block_id for it and move unpacked scorm.
===search for solution in progress===
Suppose, migrate procedures need to be merged in the script.
Any tips are appreciated!



