Forum Discussion
LMS Course Name JavaScript Action
Thanks for that, it provides some context, but I'm not sure now how to help. I can see why you thought to just use classroomName as an assignment to some internal Rise variable, but to Rise, that is just a random string of letters at that point. Rise needs to know the var is from outside its project. With Storyline, they have a script that employs the versions of SCORM API, so I use that to retrieve user inputs on relaunch (see attached) and even 'force' completion if needed.
SCORM2004_CallSetValue('cmi.completion_status', 'completed')
var player = GetPlayer();
var newTxt0 = player.GetVar('TextEntry1');
SCORM2004_CallSetValue('cmi.interactions.0.learner_response', newTxt0);
SCORM2004_CallSetValue('cmi.interactions.0.id', 'SurveyQ1');
console.log("INt0 = " + SCORM2004_CallGetValue('cmi.interactions.0.learner_response'));
I think you need to hunt for the function in a parent ESR script that looks like ...getValue('classroomName' ) - and add that to the Rise trigger
Hi Craig! Sorry to reply to an old comment, but I'm curious about the method of "forcing completion" that you mention.
I need to use either a SL Block or a Custom Code Block in Rise to send completion for a successful pre-test. However if the pre-test is not passed, I need to fall back on sending completion with 100% viewed.
I tried using your SCORM2004_CallSetValue code, with no luck -- hoping you can provide more insight on this?
- CraigBunyea-23d12 hours agoCommunity Member
Which specification are you publishing to? If it were SCORM2004, then executing that SCORM2004_CallSetValue(... ' completed') should trigger a Completed status in a LMS.
If you published to SCORM1.2, then simply aSCORM_SetCompleted("completed");
worked for me (testing a dummy course in SCORM Cloud). As I'm only familiar with Storyline, that has a Built-in variable called Quiz.ScorePercent. Do you have a trigger working on your results page which takes a passing score and send any message to the browser (ex., a javascript:alert()?) If you use your browser DevTools, the SCORM APIs are searchable - just hunt around.