Forum Discussion
JoeLloyd-17dcfe
2 years agoCommunity Member
LMS Course Name JavaScript Action
Morning all,
I am hoping someone will be able to support me here, I am trying to have a JavaScript action that will set my "CourseName" the code i am using is as follows;
var player=GetPlayer();...
CraigBunyea-23d
2 years agoCommunity Member
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