javascript getPlayer wrong value and console.log impossible

Jul 01, 2019

Hello,

I have a problem with a course. I have built a module with a quiz at the end.

Result is stored in a variable score. You need to get 4/5 to register your result.

I use php and js to send results in a database. When somebody suceed, he goes to the end page wihich call a webobject (a simple html page with webform and a call to js function to get values of variables).

var player = parent.GetPlayer();
var Score = player.GetVar("score");

It works very fine but sometimes i have scores like 19 or 8... its normally not possible... when you don't have 4, you need to start again and variable score is reset to 0. You can go the the slide of regsitration only when you have 4 or 5.

I m looking a way to solve that... 

How variables are stored in the player? I have tried to get a console.log to see when score variable is corrupted but i can't get a console.log in story.html file.
GetPlayer variable are undefined if i put a console.log in html file...
Maybe we need to add this console.log in a javascript object in the source?

This module is used mainly in safari on Ipad... the cache is very strong on safari.. Maybe when several people do the quiz in the same tab, score remains in a local storage?

I have tried to  reproduce this bug but i can't... and people who follow this module can send me feedback on this problem (end user are external visitor of a company) ... i don't know if they do the quiz more than 1 time and if they see a score like 19 in the module... (if i had these infos, i could know if the problem is in the module or when i send the score in php/js to the database...)

Somebody has an idea?

Many thanks in advance

1 Reply
Kelly Auner

Hi Alexis,

I have great news to share!

We are no longer seeing this issue in our latest version of Storyline 360 (Build 3.73.29831.0). To make sure your software is up-to-date, please launch the Articulate 360 desktop app on your computer and select the Update button next to Storyline 360. I've included our step-by-step instructions here!

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