...KnowBe4 won't let you continue if there are any errors. You can upload your package but cannot add it to any training. The support folks have been good about manually pushing it through for us, but we are going to have monthly training for the next year or so and they always need to be uploaded, viewed by others, then edited and uploaded again. With the need to contact support each time it makes this a lengthy process. That is the impact I was trying to avoid.
Issues
No switch
As with cmi.interactions there is a switch to enable/disable the behaviour. There is no such switch for cmi.objectives.
Lazy objective creation
getObjectiveById returns the next objective id if no existing id is found in the objectives list. Subsequently, the id value must be set if a new id is created or the id must be reset unnecessarily if an existing id is found as the code does not differentiate between the two scenarios. This happens after the objective index is fetched at the following lines:
Reference
Forum post: https://community.adaptlearning.org/mod/forum/discuss.php?d=4223 LMS: KnowBe4 Original pr for addition of the cmi.objectives behaviour: https://github.com/adaptlearning/adapt-contrib-spoor/pull/280
Issues
https://github.com/adaptlearning/adapt-contrib-spoor/blob/df90b8dacbe8c20e12e1d57dfd1cdfc37de82903/example.json#L8
getObjectiveById
returns the next objective id if no existing id is found in the objectives list. Subsequently, the id value must be set if a new id is created or the id must be reset unnecessarily if an existing id is found as the code does not differentiate between the two scenarios. This happens after the objective index is fetched at the following lines:https://github.com/adaptlearning/adapt-contrib-spoor/blob/df90b8dacbe8c20e12e1d57dfd1cdfc37de82903/js/scorm/wrapper.js#L704
https://github.com/adaptlearning/adapt-contrib-spoor/blob/df90b8dacbe8c20e12e1d57dfd1cdfc37de82903/js/scorm/wrapper.js#L713
https://github.com/adaptlearning/adapt-contrib-spoor/blob/df90b8dacbe8c20e12e1d57dfd1cdfc37de82903/js/scorm/wrapper.js#L730
The code should check for objective existence before setting the id so as not to unnecessarily reset it.