Access to System Variables

Jun 24, 2020

I have written a light LMS with PHP and MySQL - how can I access your system variables via javascript trigger to track scores etc. ? I read the article in which you say you hide system variables to ensure your product works well, but there is no danger in allowing me to access the course score via javascript so I can ajax it to a MySQL database via PHP...any suggestions? 

1 Reply
Sam Hill

You would need to access the Storyline variables via the player

<script>
var player = <content window>.GetPlayer();
player.GetVar('<var name>');
</script>

You are better off using the SCORM API, this way the content can Set and Get the score and suspend_data etc to and from you LMS. Data Comms are usually initiated via the module rather than the LMS.

Would highly recommend building a simplified SCORM API to achieve what you are looking to achieve.

This discussion is closed. You can start a new discussion or contact Articulate Support.