Hi Felix, thanks for checking. You should not need a SCORMCloud account to access the course. SCORMCloud should prompt you to enter your email address and then show a button to launch the course. It was working but maybe the invite link expired or something.
My solution uses JavaScript as well. Someone posted some code to do this in the community forum, but it did not work properly. I made some edits to the code and have managed to get it to work on SCORMCloud, Cornerstone, and Moodle.
This is the code if you want to try using it.
var player = GetPlayer();
function findLMSAPI(win) {
if (win.hasOwnProperty("GetStudentID")) return win;
else if (win.parent == win) return null;
else return findLMSAPI(win.parent);
}
var lmsAPI = findLMSAPI(this);
var lmsName = lmsAPI.GetStudentName();
var commaIndex = lmsName.indexOf(',');
player.SetVar("UserName", ((commaIndex == -1) ? lmsName : lmsName.substr(commaIndex + 1).trim() + ' ' + lmsName.substr(0,commaIndex)));
-----------
To use the code:
1. Put an Execute JavaScript trigger on your first slide and set it to trigger when the timeline starts.
2. Create a text variable in Storyline called UserName
3. Add a text box with %UserName% wherever you want the name to appear in the course.