Button to set AICC variables quirk

jasonadal
jasonadal Community Member Posts: 441 ♪ Opening Act ♪
I'm setting up my course so that if a learner gets a certain number of questions correct during a course, they do not have to take the final test. On the last page of the course, I've created a button that has the onClick actions to set the AICC_Score and AICC_Lesson_Status variables. This button should only be visible if the learner scores high enough on the course.

I've discovered that an onPageShow Hide does not work under any circumstance unless the button is initially hidden or part of a group that is initially hidden. This applies whether the button is grouped or independent on the page. I've attached a sample that replicates this, which is from Lectora 16.2.2.

I won't be updating to 17 for a few more weeks so I can finish this project first. It might be worth testing in 17, as I can't speak to whether it was fixed there or not.

(You might ask, "but what's wrong with having it initially hidden then show if the conditions are met?" My preference is to hide elements rather than show initially hidden elements as it seems easier to control reading order when it comes to screen readers this way.)

Comments

  • timk
    timk Community Member Posts: 1,205 ♦ Idol ♦
    On: Page show is triggered very early, it may be that the button isn't available to be hidden, depending on how many objects are before it in the title explorer. Try to hide it On: Show either of the page or the button itself.
  • jasonadal
    jasonadal Community Member Posts: 441 ♪ Opening Act ♪
    Part of what threw me off about it was that both buttons were in a group and one of the buttons would hide, but not the one that set the AICC_Score, etc. As soon as I took the actions off that button, it would hide correctly. I have the action on the page level as the last action to occur and it is working - I need to remind myself to move actions if they're not behaving (or send them to the corner for a timeout if they're being really bad).
  • jvalley4735
    jvalley4735 Community Member Posts: 1,357
    You might want to change it to a timer that repeats itself??? Maybe lol