One SCORM package multiple courses?

Re: One SCORM package multiple courses?

by Peter Bowen -
Number of replies: 0

From the zip perspective, this may be of use

https://tracker.moodle.org/browse/MDL-44548

It is still in progress, but I have implemented on my system and works a treat the following from Andea Cruz Mendes:

Dan, I think the problem is the "contenthash" of the files.
The FileStorage gets the old file's content (and extracts it) because the new contenthash is still the same.
It needs to be synced.

I'm using the filesystem repository to storage the scorm packages.
Then, I make some changes in two php files:

  • repository/filesystem/lib.php
    • because the function "sync_reference()" was syncing just image files;
  • mod/scorm/locallib.php
    • before "$packagefile->import_external_file_contents();" need to call "$packagefile->sync_external_file();"
    • and remove the conditions like "$scorm->scormtype != SCORM_TYPE_LOCAL" to call scorm_parse($scorm, false);

It works for me (I'm using Moodle 2.7).

Hope this helps.


Cheers
Peter