Retain objects displayed when returning to the page.

switalba
switalba Community Member Posts: 88
I have a page in which the learner clicks an object (which is always visable) and another object (initially hidden) appears. The learner now goes to the next page, however when the learner goes "back" to the previous page, the originally hidden objects that were displayed because the learned selelcted the other object is now reset.



I don't have any variables on this page as it's purely used to allow the learner to select objects they would like to complete. No scoring is on this page.



How do I set up the page to retain the initially hidden objects that were displayed because the leaners clicked another object. I am sure there are variables involved but don't know where to start with this one.

Comments

  • sirwise23
    sirwise23 Community Member Posts: 442 ☆ Roadie ☆
    Hello,



    This will take a variable to do but not hard at all. How many objects are there on that page that you want shown? Is there just one object? Can you not go to the next page at all until that object is clicked?
  • switalba
    switalba Community Member Posts: 88
    There are 5 unhidden objects in which the learner can select each one that will display another hidden object. There are 5 hidden objects. However the learner only needs to select at least 3 objects. It would be good to not allow the learner to continue to the next page unless at least 3 objects are selected, but not all 5 objects have to be selected.



    Thanks
  • sirwise23
    sirwise23 Community Member Posts: 442 ☆ Roadie ☆
    @switalba 63113 wrote:
    There are 5 unhidden objects in which the learner can select each one that will display another hidden object. There are 5 hidden objects. However the learner only needs to select at least 3 objects. It would be good to not allow the learner to continue to the next page unless at least 3 objects are selected, but not all 5 objects have to be selected.



    Thanks


    Hmmm... There are a few ways to go about this. You can try:



    1) Create 5 variables. Doesn't really what they are named, VIEWED01,VIEWED02, etc... Make the initial value for them 0

    2) On each unhidden object put an action that says On Click, Modify Variable, Target: VIEWED01, and change the value to 1.

    (Do this for each object pointing to the next variable)

    3) Put 5 actions on the page. The actions could be, ON SHOW, SHOW (UNHIDDEN OBJECT 1), on the condition that VIEWED01 = 1

    (Have 5 actions that do this for each object) As long as the variables are set to be retained between sessions, even if they leave the course, when they come back to this page the ones that were visible will stay that way.



    As far as going to the next page after 3 objects are selected but not all 5, I think it depends on your hwo the page works. Can you unclick an object once it's been clicked?
  • benpitman
    benpitman Community Member Posts: 763
    Do something similar but instead just use 1 variable say _viewed. Instead of setting it, add a letter to the variable corresponding to the object (a, b, c, d, e) as an action on the button that shows the object. Then have 5 page level On Show actions that show each of the objects
    1. Show object 1 if _viewed CONTAINS a
    2. Show object 2 if _viewed contains b
    3. etc
    As to preventing navigation to the next page:
    1. Create a grayed out Next button and place on top of current button.
    2. Create an action group that has actions like these:
    • Set a new variable _count to 0. You can use this on many pages. You do not need one for evvery page like this
    • Add 1 to _count if _viewed contains a
    • add 1 to _count if _viewed contains b
    • ...
    • Add 1 to _count if _viewed contains e
    • Hide grayed out Next button if _count >+ 3
    1. ​Add a Run Action Group to each button to run this group as the last action on the button
    2. Add an On Show action at the page level to run this action group
  • sirwise23
    sirwise23 Community Member Posts: 442 ☆ Roadie ☆
    Great Idea with the letters Ben.



    Another option for the next button is to just exclude the normal next button for that page,then copy and paste the next button on to this page and have it go to next page with a condition that _count is > or= 3 or else Display message "Please click on....etc"



    You are correct with the count. I misread what he said and thought that he wanted 3 clicked but NOT all 5.
  • switalba
    switalba Community Member Posts: 88
    Thank you all for responding and the page is getting there. I am beginning to understand variables a little better.



    One clarification. I don't want the forward button to appear until the learner selects at least 3 out of the 5 option and it would be great if the learner does not need to click a "submit" button of some sort to do this. Bascially once the learner clicks 3 out of the 5 items the forward button appears. Is that possible?
  • benpitman
    benpitman Community Member Posts: 763
    Of course. That is how it I explained it. I HIGHLY recommend you have a Next button maybe grayed out so the learner does NOT get confused. You should NEVER leave them in the dark. Have something there as sirwise says to let them know what they need to do to proceed. If you have more questions you can call or email me.



    Also learn more about variables in the Lectora U and with my book, Lectora 301.
  • sirwise23
    sirwise23 Community Member Posts: 442 ☆ Roadie ☆
    @benpitman 63165 wrote:
    Of course. That is how it I explained it. I HIGHLY recommend you have a Next button maybe grayed out so the learner does NOT get confused. You should NEVER leave them in the dark. Have something there as sirwise says to let them know what they need to do to proceed. If you have more questions you can call or email me.



    Also learn more about variables in the Lectora U and with my book, Lectora 301.


    Agreed. That's why I mentioned the message. It's not only about the page working but also about Adult Learning design and at the end of the day, avoiding phonecalls. I'm actualy a LMS person as well. I overhear the help desk calls all the time. Some vendors here have built courses that have Next buttons that don't actually do anything at all until after a 7 minute video finishes. Untill I had it fixed we would get constant calls from people that haven't finished the video calling the help desk to say that the course is broken an the next button doesn't work. (Also, many people will just spam the next button given the chance).



    If you are going to hide the next button, you can follow Ben's Action group instructions and put a message on the page that says something about the Next button appearing after they click 3 images.