Forum Discussion
Report to an external LRS
Hello!
I tested the Articulate Storyline update on February 15th 2022 and I hasten to report that I am absolutely satisfied with the new feature - JS templates for getting an actor. It works fantastic for old LMS.
I just have one question: is this the last new feature for Storyline? Roadmap is empty...
Oleg, are you pulling SCORM variables (Student ID or Student Name) from your "old LMS" using this approach? I'm trying to adapt the "Static Account" template to grab the Student ID, but without success.
- OlegBuylov-33cc3 years agoCommunity Member
Hello Stephen,
I'm using a personal JavaScript template, you can try:
lmsAPI = parent;
function getActor() {
return {
"objectType": "Agent",
"account": {
"homePage": "https://www.example.com",
"name": lmsAPI.GetStudentID(),
}
};
}
Unfortunately, I find it difficult to respond to this forum. I have to use VPN. Articulate Global, LLC has blocked access to all users from Russia.- LaurenDuvall3 years agoStaff
Thank you for sharing this code with Stephen, Oleg! I do want to clarify - we have not blocked access to the E-Learning Heroes site. Please reach out to our team directly at support@articulate.com if you are not able to access E-Learning Heroes.
- KenHaas3 years agoCommunity Member
Hello Stephen,
Thank you for this Javascript! It worked perfectly for me in ScormCloud but doesn't appear to work for all LMS's as it did not work for me within Cornerstone. It actually breaks the course completely in Cornerstone. The course gets stuck on the loading screen and never launches.
It took a lot of tinkering but I was finally able to get it to work for Cornerstone too by using the below JavaScript. Just wanted to share for others that my find it valuable.
function findLMSAPI(win) {
// look in this window
if (win.hasOwnProperty("GetStudentID")) return win;// all done if no parent
else if (win.parent == win) return null;// climb up to parent window & look there
else return findLMSAPI(win.parent);
}function getActor() {
var lmsAPI = findLMSAPI(this);
var myName = lmsAPI.GetStudentName();
return {
"objectType": "Agent",
"account": {
"homePage": "https://url.com",
"name": myName
}
};
}