Learner information from Moodle


Is it possible for a Storyline v2 module to pull information from Moodle?

I know how to get the learner to enter their name into a text box at the start of a module and then by using variables/references the module can display the text - i.e "Hello Nick and welcome to this eLearning module" - however is it possible for Storyline to automatically "pull" the learners name and organisation for example from their Moodle login details?



3 Replies
Matthew Bibby

Hi Nick,

You should be able to grab their name using JavaScript, but I don't think it'll be possible to grab the organisation. Here are some best practices re using JavaScript in Storyline

This code should get you started:

var lmsAPI = parent;
var name = lmsAPI.GetStudentName();
var nameArray = name.split(",");
var firstName = nameArray[1];
var player = GetPlayer();

You'll need a text variable called name in Storyline and then you can use the reference %name% to display the learner's first name in Storyline.

Hope that helps.