Skip to main content
Known Participant
March 28, 2023
Answered

Preventing reset of buttons hide/show and state after new session in LMS

  • March 28, 2023
  • 1 reply
  • 350 views

Hi all.

I have click-and-reveal-slides.

You click the 1st button (smart shape), and a text (with connected aduio) and an image is shown, and the 2nd button appears.

You click the 2nd button, and the previous text and image is hidden, and a new text and image is shown.

There can be multiple buttons, and I'm using cpExtra to show and hide the slide elements and to change the states of the buttons and to show/hide them, so I don't have to use shared actions. 

 

On enter, only the first button is visible. I want to guide the order the user click the buttons in. I also want a tick to show on the button, once it has been clicked. This way, the user can see what button has been clicked and not. I therefore have two buttons (btnNormal1_ and btnVisited1_), so that the tick can also show on the Hover state as well. (I know cpExtra has some functionality here, but I can't make it work properly). All the buttons are set to "Retain State on Slide Revisit".

 

This all works fine, until the user closes the course and re-opens it. The slide completely resets.

The buttons, that have been set to visible during the last session, are now hidden.

The buttons set to hidden, are now visible.

The states of the buttons are now back to Normal.

I was hoping "Retain State on Slide Reveisit" would also work between sessions, but it seems it does not.

 

Is there a saimple way to make the course keep the states of the buttons and what objects were shown/hidden, between session (closing and re-poening the course)?

 

I'm looking to keep things simple and without javascript, but I'm coming up short.

My plan B is to use cmi.comments to store something like "*cpCurrentSlide". on each slide entry. Ending up with a string in cmi.comments like this, with all visited slides: *1*2*3...

I can then read this on the first slide, store it in an array and use this to show all buttons, if cpCurrentSlide is in that array.

 

Here's a screenshot (In Norwegian 🙂 ...

This topic has been closed for replies.
Correct answer Lilybiri

There is NO simple way, because all variables are reset when closing a session.

You would need programming skill to store and retrieve the values of the variables when another session is opened. That may be not too complicated if the learner always accesses the course from the same system (local storage) but for a full solution that is not the case because you cannot do it from the client side.

1 reply

Lilybiri
LilybiriCorrect answer
Legend
March 28, 2023

There is NO simple way, because all variables are reset when closing a session.

You would need programming skill to store and retrieve the values of the variables when another session is opened. That may be not too complicated if the learner always accesses the course from the same system (local storage) but for a full solution that is not the case because you cannot do it from the client side.

Known Participant
March 28, 2023

Thanks for the speedy reply @Lilybiri.

 

That's what I feared. I started the project with much functionality in JS but see that it quite quickly gets complicated. So, if someone else were to inherit the administration and updating of the course, it would be very difficult. I find it strange that something I intuitively think should be feature, just doesn’t exist. Not all e-learning is done in one sitting ... no matter how short they may be.

 

Oh well. Plan B it is.

Lilybiri
Legend
March 28, 2023

I understand your frustration, but believe that is valid for most eLearning assets. Captivate allows a lot of customisation and flexibility with shared/advanced actions and JS, but the final output is on a webserver and/or a LMS and has to comply with that situation. 

I am just curious about your plan B? If you use a LMS, try to explore its features.