19 Replies
Peter Brown

Remember to always be mindful of the platforms/outputs under which javascript will work reliably. E.g. if you're operating outside of a Flash output, javascript MAY not do all the things you'll ask of it. Having said that, under the right conditions! Phil's example will talk to the LMS as you want.

Jesse Fuhrman

Does anyone here know how I can find what the variable name of a grade item in Moodle is so that I can use it with Phil's js?  I'd like to pull a Pre-Test score from the beginning of a course into a Post-Test results slide to compare the two.  The problem is that they are in different .story files, as there are many parts to the course.

Mahalakshmi Babu

Hi Phil, i am trying to get info like student name and students email id from moodle into storyline project using javascript. But its not working. This is the script i have used


var player = GetPlayer();


var myName  = lmsAPI.GetStudentName();

var myID  = lmsAPI.GetStudentID();


var array  = myName.split(',');

var newName = array[1] + '  ' + array[0];


player.SetVar("FullName", newName);

player.SetVar("StuId", myID);


Is there something that i have to change in the script?

Peter Brown

Yes, Alex, please do share your work around. When you say 'using Tin Can', are you referring to your Storyline export method, or the LMS?

When I first posted this thread (looks like over three years ago!), Tin Can wasn't an option. We only had SCORM.

I look forward to seeing how you've pulled the info from Tin Can.