Hey all, this should be a simple mistake on my part, but I can't see
it. I'm trying to use pipwerks' scorm wrapper to connect to moodle LMS
(Moodle 1.8.13+ (Build: 20100825) )
I set a number of values and do scorm.save()
Then I try to retrieve the values. I can retrieve the version and
cmi.interactions._count
=0 changes to cmi.interactions._count=2 when I refresh which suggests
set is working somehow (right?)
But cmi.interactions group= still returns nothing.
I'd set and saved the following values. cmi.interactions.group SHOULD
return them via series of get statements converted into strings. Any
ideas? SCORM 2004 is backwards compatible with 1.2, right? Thanks for
any help!!
....
scorm.set("
cmi.interactions.1.id","Q_123435467-foo");
scorm.set("cmi.interactions.1.type","multiple_choice");
scorm.set("
cmi.interactions.1.objectives.0.id","iobjid1");
scorm.set("cmi.interactions.1.timestamp","2007-01-18T22:10:35.84Z");
scorm.set("cmi.interactions.1.correct_responses.
0.pattern","blue[,]white][,]red");
scorm.set("cmi.interactions.1.weighting","2");
scorm.set("cmi.interactions.1.learner_response","blue[,]red");
scorm.set("cmi.interactions.1.result","incorrect");
scorm.set("cmi.interactions.1.latency","PT2M54S");
scorm.set("cmi.interactions.1.description","What are the colors in the
French flag?");
scorm.save();
testvar = "" + scorm.get("
cmi.interactions.1.id") +
scorm.get("cmi.interactions.1.type") + scorm.get("cmi.interactions.
1.objectives.0.id") + scorm.get("cmi.interactions.1.timestamp");
output.appendText("\ncmi.interactions group="+testvar);
Here's the whole function for the relevant code;
function testScorm():void{
//interactions; id, objectives, time, type, correct_responses,
weighting, student_response, result, latency
output.mouseWheelEnabled=true;
testvar = scorm.get("cmi._version");
output.appendText( "\ncmi.version=" + testvar); // (characterstring,
RO) Represents the version of the data model
output.appendText( "\ncmi.version test=" + scorm.get("cmi._version") +
scorm.get("cmi._version"));
output.appendText( "\ncmi.interactions._children\n=" +
scorm.get("cmi.interactions._children")); //
(id,type,objectives,timestamp,correct_responses,weighting,learner_resposne,result,latency,description,
RO) Listing of supported data model elements
//cmi.interactions._children=id, objectives, time, type,
correct_responses, weighting, student_response, result, latency
testvar = scorm.get("cmi.comments_from_learner._children");
output.appendText( "\ncmi.comments_from_learner._children=" +
scorm.get("cmi.comments_from_learner._children")); //
cmi.comments_from_learner._children (comment,location.timestamp, RO)
Listing of supported data model elements
testvar = scorm.get("cmi.comments_from_learner._count");
output.appendText( "\ncmi.comments_from_learner._count \n=" +
testvar); // (non-negative integer, RO) Current number of learner
comments
testvar = scorm.get("cmi.comments_from_learner.n.comment");
output.appendText( "\ncmi.comments_from_learner.n.comment\n=" +
testvar); //(localized_string_type (SPM: 4000), RW) Textual input
testvar = scorm.get("cmi.comments_from_learner.n.location");
output.appendText( "\ncmi.comments_from_learner.n.location\n=" +
testvar); // (characterstring (SPM: 250), RW) Point in the SCO to
which the comment applies
testvar = scorm.get("cmi.comments_from_learner.n.timestamp");
output.appendText( "\ncmi.comments_from_learner.n.timestamp\n=" +
testvar); //(time (second,10,0), RW) Point in time at which the
comment was created or most recently changed
testvar = scorm.get("cmi.comments_from_lms._children");
output.appendText( "\ncmi.comments_from_lms._children\n=" +
testvar); //(comment,location.timestamp, RO) Listing of supported data
model elements
testvar = scorm.get("cmi.comments_from_lms._count");
output.appendText( "\ncmi.comments_from_lms._count\n=" + testvar); //
(non-negative integer, RO) Current number of comments from the LMS
testvar = scorm.get("cmi.comments_from_lms.n.comment");
output.appendText( "\ncmi.comments_from_lms.n.comment\n=" +
testvar); //(localized_string_type (SPM: 4000), RO) Comments or
annotations associated with a SCO
testvar = scorm.get("cmi.comments_from_lms.n.location");
output.appendText( "\ncmi.comments_from_lms.n.location\n=" +
testvar); //(characterstring (SPM: 250), RO) Point in the SCO to which
the comment applies
testvar = scorm.get("cmi.comments_from_lms.n.timestamp");
output.appendText( "\ncmi.comments_from_lms.n.timestamp\n=" +
testvar); //(time(second,10,0), RO) Point in time at which the comment
was created or most recently changed
output.appendText( "\ncmi.completion_status\n=" +
scorm.get("cmi.completion_status")); //(state (completed, incomplete,
not attempted, unknown), RW) Indicates whether the learner has
completed the SCO
output.appendText( "\ncmi.completion_threshold\n=" +
scorm.get("cmi.completion_threshold")); //(real(10,7) range (0..1),
RO) Used to determine whether the SCO should be considered complete
output.appendText( "\ncmi.credit\n=" + scorm.get("cmi.credit")); //
(state (credit, no_credit), RO) Indicates whether the learner will be
credited for performance in the SCO
output.appendText( "\ncmi.entry\n=" + scorm.get("cmi.entry")); //
(state (ab_initio, resume, ""), RO) Asserts whether the learner has
previously accessed the SCO
output.appendText( "\ncmi.exit\n=" + scorm.get("cmi.exit")); //(state
(timeout, suspend, logout, normal, ""), W) Indicates how or why the
learner left the SCO
output.appendText( "\ncmi.interactions._count\n=" +
scorm.get("cmi.interactions._count")); //(non-negative integer, RO)
Current number of interactions being stored by the LMS
output.appendText("\ntest 2-----------\n\n");
scorm.set("
cmi.interactions.n.id", "this is a test program");
output.appendText( "\
ncmi.interactions.n.id\n=" +
scorm.get("
cmi.interactions.n.id")); //(long_identifier_type (SPM:
4000), RW) Unique label for the interaction
output.appendText( "\ncmi.interactions.n.type\n=" + scorm.get("
")); //(state (true_false, multiple_choice, fill_in, long_fill_in,
matching, performance, sequencing, likert, numeric, other), RW) Which
type of interaction is recorded
scorm.set("cmi.interactions.1.objectives._count", "thistestb"); //
test. this may not exist
output.appendText( "\ncmi.interactions.1.objectives\n=" +
scorm.get("cmi.interactions.1.objectives"));
output.appendText( "\ncmi.interactions.n.objectives._count\n=" +
scorm.get("cmi.interactions.n.objectives._count")); //(non-negative
integer, RO) Current number of objectives (i.e., objective
identifiers) being stored by the LMS for this interaction
scorm.set("
cmi.interactions.1.objectives.1.id", "objective1");
scorm.set("
cmi.interactions.0.id","Q_123435467-foo");
scorm.set("cmi.interactions.0.type","multiple_choice");
scorm.set("
cmi.interactions.0.objectives.0.id","iobjid1");
scorm.set("cmi.interactions.0.timestamp","2007-01-18T22:10:35.84Z");
scorm.set("cmi.interactions.0.correct_responses.
0.pattern","blue[,]white][,]red");
scorm.set("cmi.interactions.0.weighting","2");
scorm.set("cmi.interactions.0.learner_response","blue[,]red");
scorm.set("cmi.interactions.0.result","incorrect");
scorm.set("cmi.interactions.0.latency","PT2M54S");
scorm.set("cmi.interactions.0.description","What are the colors in the
French flag?");
scorm.set("
cmi.interactions.1.id","Q_123435467-foo");
scorm.set("cmi.interactions.1.type","multiple_choice");
scorm.set("
cmi.interactions.1.objectives.0.id","iobjid1");
scorm.set("cmi.interactions.1.timestamp","2007-01-18T22:10:35.84Z");
scorm.set("cmi.interactions.1.correct_responses.
0.pattern","blue[,]white][,]red");
scorm.set("cmi.interactions.1.weighting","2");
scorm.set("cmi.interactions.1.learner_response","blue[,]red");
scorm.set("cmi.interactions.1.result","incorrect");
scorm.set("cmi.interactions.1.latency","PT2M54S");
scorm.set("cmi.interactions.1.description","What are the colors in the
French flag?");
scorm.save();
testvar = "" + scorm.get("
cmi.interactions.1.id") +
scorm.get("cmi.interactions.1.type") + scorm.get("cmi.interactions.
1.objectives.0.id") + scorm.get("cmi.interactions.1.timestamp");
output.appendText("\ncmi.interactions group="+testvar);
================all testing output follows===================
mi.version=3.4
cmi.version test=3.43.4
cmi.interactions._children
=id, objectives, time, type, correct_responses, weighting,
student_response, result, latency
cmi.comments_from_learner._children=
cmi.comments_from_learner._count
=
cmi.comments_from_learner.n.comment
=
cmi.comments_from_learner.n.location
=
cmi.comments_from_learner.n.timestamp
=
cmi.comments_from_lms._children
=
cmi.comments_from_lms._count
=
cmi.comments_from_lms.n.comment
=
cmi.comments_from_lms.n.location
=
cmi.comments_from_lms.n.timestamp
=
cmi.completion_status
=
cmi.completion_threshold
=
cmi.credit
=
cmi.entry
=
cmi.exit
=
cmi.interactions._count
=2
test 2-----------
cmi.interactions.n.id
=
cmi.interactions.n.type
=
cmi.interactions.1.objectives
=
cmi.interactions.n.objectives._count
=
cmi.interactions group=