Possible to skip slides based on a user's ID or level?

Hi,

I'm building out a new project and the client would like for users to either view the full CBT, or skip ceratin slides, based on one of two user levels. I'm wondering if it's possible to achieve this using Storyline.

1. How to assign a user level when the user starts the CBT

2. How to skip certain slides based on that user level.

I suppose #2 could be achieved by a variable trigger on the Next buttons, but I'm not sure where/how to assign that user level/ID. Any ideas would be greatly appreciated!

Obviously there could be more than one CBT, but they are going to require a lot of updates and the client is hoping to avoid editing more than one CBT.

Thanks in advance

9 Replies
Emily Ruby

Hello Michael!

You could set this up by adding a starting slide where user can select their user level. The you can have that selection branch to the slides they need to view. You could set up 2 scenes, one for each level with the slides needed. Or you could use the variable as you said. You could have the button for the user lever change the variable, and have the next button branch based on the variable.

Michael Ty

Hey Emily,

Thanks for the response! The tricky part here is that they user level needs to be imported somehow, so that based on their answers on the website that launches the CBT, the CBT would play and determine the path of the CBT (which slides could be skipped) based on that user level that is imported. Does that make sense?

Kind of tricky. I guess the first questions is if there is a way to import that user level, in other words launch the CBT with the user level variable stored.

Thanks!

Marc Lee

I have not tried this but if you could attach a query string to the url where the users launch their course (e.g., www.mycoursehost.com/coursename/story.html?q=1) (or =2) you should be able to write Javascript to parse that when the course launches. You'd need a trigger on the first slide for when timeline starts to execute a script that can pass that q value to an internal SL variable representing the level. To create the querystring initially you'd probably need some sort of a login page they would fill in when they wanted to play the course. Hope this helps

Michael Ty

I did find a solution to this, so thought I would share. In my example I had 3 user levels (1,2,3) and set it up to launch the story file with an extension like ?q=1, ?q=2, or ?q=3, for example http://websiteurl.com/story.html?q=1

Then in the slide that where you want to add the argument to alter which slide they advance to when clicking the next button, depending on their user level, you can add an Execute Javascript trigger with the following code

function gup( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return results[1];
}

var player = GetPlayer();

var sid = gup("q");
var cid = gup("q");

player.SetVar("q",sid);
player.SetVar("q",cid);