Show number of slides viewed

Oct 16, 2015

It seems to me that since the built in menu knows if a slide has been viewed or not, that there is some system variable setting "viewed" to true. Why can't we have access to that? It would solve a ton of issues and allow folks to visually show learner progress. 

I know that I can set a Boolean variable "Slide1Viewed" on every slide and set it to true if it has been viewed and then have a second variable count each slide as it is viewed if its value is false... but that is a ton of work and a ton of variables on a larger project.  

10 Replies
Ashley Terwilliger-Pollard

Hi Bill and Brian,

Our team had a recent discussion on different system variables and accessibility to users. As such we've updated our documentation here and included below:

We want every feature in our software to work well. With that goal in mind, we've decided not to document Articulate Storyline system variables that could be accessed via JavaScript triggers at this time.

Storyline isn't currently designed to expose system variables for user interaction. As a result, JavaScript triggers that reference them could interfere with course playback.

We value your feedback and want to better understand your needs, so we can build even better software. Help us plan for the future. Send us your feature requests with specific system variables you'd like to see and examples of how they could be used.

Hope that helps clarify - and definitely sending the feature requests will be helpful. 

Snorre Rubin

I have built a custom javascript solution to do this. You need a variable (I called it viewed) to store the slides viewed, and a variable to store the number of slides viewed. The script will do the rest. 

var player = GetPlayer();
var id = document.getElementsByClassName("slide-transition-container")[0].getAttribute("data-reactid");
var viewed = player.GetVar("viewed");
if (viewed == "") {
  viewed = [];
};
  if (viewed.indexOf(id) == -1){
  viewed.push(id);
};
result = viewed.length;
player.SetVar("numberViewed", numberViewed);
player.SetVar("viewed", viewed);

The script gets the unique slide ID from the html, and stores it in an array, then gets the length of the array.

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