I'm creating a JSON string and passing it to a SCORM 1.2 compliant LMS thus:
var tmp = {};
tmp.assess = assessScore;
tmp.loc = location;
tmp.progress = notes.topics.to String();
fScormSetValue( "cmi.suspend_da ta", tmp.toJSONStrin g(), false);
alas the LMS complains with this error
Error: missing ; before statement
Line: 1104, Column: 35
Source Code:
this.cmi.suspen d_data.cmivalue
= "{"assess":{"0_ 1q":true},"loc" :"res_0_2.htm", "progress":"1"} ";
------^
Ok, the LMS sees the JSON string as more than one string. I can, though,
successfully read and write it to a cookie.
I'm not sure what's going on. How do I resolve this?
Andrew Poulos
var tmp = {};
tmp.assess = assessScore;
tmp.loc = location;
tmp.progress = notes.topics.to String();
fScormSetValue( "cmi.suspend_da ta", tmp.toJSONStrin g(), false);
alas the LMS complains with this error
Error: missing ; before statement
Line: 1104, Column: 35
Source Code:
this.cmi.suspen d_data.cmivalue
= "{"assess":{"0_ 1q":true},"loc" :"res_0_2.htm", "progress":"1"} ";
------^
Ok, the LMS sees the JSON string as more than one string. I can, though,
successfully read and write it to a cookie.
I'm not sure what's going on. How do I resolve this?
Andrew Poulos
Comment