JavaScript to Change Menu Navigation Restrictions at Runtime

Jul 05, 2021

I have a course that is published with the "Restricted" player menu navigation setting.  I'd like for certain learners to have the ability to jump around the course without a requirement to complete the course sequentially.  In other words, I'd like these learners to have "Free" menu navigation.  All others must have "Restricted" navigation.

Assume I can identify the users who are permitted to navigate freely.  Is it possible to create a trigger in Storyline that executes JavaScript that will change the player's menu navigation setting from its published state ("Restricted") to an alternate state ("Free")?

I realize that Articulate doesn't officially support this type of customization, but if it's possible, I'm hoping that someone may have a code sample that points me toward a solution. 

Thanks!

4 Replies
Josh Dean

I know this is a little old, but I was curious and looked into this a little. I exported an HTML publish version with the value set as 'free'. Then I applied git version control to the folder and replaced what I published with a 'restricted' version. This just lets me see which files hold any differences in the whole published package. 

Besides a number of ID numbers throughout, there seems to be some changes related to this in the 'frame.xml' file in the 'story_content' folder where the values changes from 'free' to 'restricted'. There are also some changes in what appears to be a randomly named .js file in the 'js' folder. The data.js file loads the xml at some point so you could see where that is loaded to. 

Hope this helps in some way. At this point it might be easier to build your own custom side nav then try to dig into updating this.

Ted Nunes

I stumbled onto this thread since we are seeking a similar functionality. I just submitted a feature request. I recommend anyone that's interested do the same--supposedly the squeakiest wheel gets the grease. I believe it would be a valuable feature to help development of learner-centric content.

Here's the text of my request:

A trigger to change a restricted menu to free flow.

(even better would be section (or even slide-level) granularity...but I know that's a reach.) Use case: a course with a pre-test where student could test out of various topics. Failed topics remain restricted and must be viewed, but once viewed all topics are unlocked, including the ones they "passed" and weren't required to view.

This CAN be accomplished by building a custom menu, but it's a lot of extra programming.

Math Notermans

Reading this i remembered a similar question i found a workaround for. Post about that is here.
https://community.articulate.com/discussions/articulate-storyline/trigger-to-change-player-flow

Basically the solution i had was not trying to change 'restricted' to 'free' but blocking list items in the menu thus in fact restricting choices.

https://360.articulate.com/review/content/c6b7e48a-f204-441d-81ea-4cdd5ed6a524/review

This approach also has the big advantage that you can customize menu items/list items as you can see in the second example.

https://360.articulate.com/review/content/146cbdd5-f36c-4ce4-a5f6-94effde85c42/review 

Working Storyline added.