javascript - SCORM 2004 Get and Set Values -
i trying , set completion status of various objectives. trying these;
str = scorm.getvalue("cmi.objectives." + i.tostring() + ".completion_status");
getvalue('cmi.objectives.0.completion_status') returned '' in 0 seconds [13:50:23.469] checking getvalue error [13:50:23.469] scorm error found - set error state: 301 - objectives collection not have element @ index 0, current element count 0.
this log of scorm cloud. think might related giving ids objectives.
my objectives not set id in manifest , don't know have it. question need give id each objective (manifest or javascript)?
if think/guess/know problem different, appreciated.
so typically check - scorm.getvalue('cmi.objectives._count') know if had objectives poll.
if came 2, have 2 objectives loop thru cmi.objective.x.id needed update. or, if adding new objective, _count give next available index in packed array.
if had _count of 1 worth trying check completion_status etc ... otherwise you'll generate scorm errors 1 described.
hope helps.
Comments
Post a Comment