Error When Adding AICC Package

Error When Adding AICC Package

by Sarah Smith -
Number of replies: 3

I received a test course as an AICC in .zip format. I added a new blank course in Moodle, added a new SCORM activity, and uploaded the .zip file. I did not change any settings on the activity. When I saved the activity, I got an error that said "Error writing to database" with the following debug information: 

Debug info: Column 'identifier' cannot be null
INSERT INTO mdl_scorm_scoes (identifier,scorm,organization,title,parent,launch,scormtype,sortorder) VALUES(?,?,?,?,?,?,?,?)
[array (
0 => NULL,
1 => '6',
2 => '',
3 => NULL,
4 => '/',
5 => '',
6 => '',
7 => 1,
)]
Error code: dmlwriteexception
Stack trace:
  • line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 1331 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1377 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
  • line 293 of /mod/scorm/datamodels/aicclib.php: call to mysqli_native_moodle_database->insert_record()
  • line 306 of /mod/scorm/locallib.php: call to scorm_parse_aicc()
  • line 168 of /mod/scorm/lib.php: call to scorm_parse()
  • line 122 of /course/modlib.php: call to scorm_add_instance()
  • line 154 of /course/modedit.php: call to add_moduleinfo()

I am running Moodle 3.7.4. My AICC package is attached.


Average of ratings: -
In reply to Sarah Smith

Re: Error When Adding AICC Package

by Melanie Scott -
Picture of Particularly helpful Moodlers
Have you looked at what is in the package? Not all AICC and SCORM packages are built the same way. There could be things missing. generally, I think it looks for a manifest if the manifest is inside a folder and not at the top level, it could prevent proper loading (I've actually seen this happen).
Average of ratings: Useful (1)
In reply to Melanie Scott

Re: Error When Adding AICC Package

by Sarah Smith -
The package includes course.au, course.crs, course.cst, and couse.des; they are all in the top-level and there are no other folders within it.

I did some research this morning and found that AICC packages only have 4 mandatory files, which are all included in my package. There are also 3 optional files, which my package does not include. None of the requirements list needing a manifest file. https://docs.moodle.org/25/en/SCORM_FAQ#AICC_Package_Contents
In reply to Sarah Smith

Re: Error When Adding AICC Package

by Sarah Smith -
I finally figured it out with help from this post: https://moodle.org/mod/forum/discuss.php?d=416647

I had to Enable Direct AICC URL and Enable External AICC HACP in the SCORM plugin settings. Then on course's SCORM activity settings, I changed the package to be type of "External AICC URL", then used the URL that was in course.au file in the URL field. There is no need to upload the package that just has the 4 files.