Explore the community Forums Lectora Lectora Questions & Answers Disable next button until all questions on page answered correctly

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #374473 Score: 0
    Profile photo of Pip Valleley
    Pip Valleley
    Member
    beginner
    intermediate
    profile
    Group Member
    wise owl
    curious george
    contributor
    friend finder
    1 pt
    @pvalleley3585

    Hi

    I have four questions on one page each with a submit button giving feedback.  I have disabled the next button and added onshowsetstate to this with each question (from the reserved list) added and the relationship set to “is correct” but this doesn’t work.  What have I done wrong?

    Regards

    Pip

     

    #374486 Score: 0
    Profile photo of Jason Dalrymple
    Jason Dalrymple
    Member
    beginner
    intermediate
    profile
    wise owl
    curious george
    contributor
    friend finder
    advanced
    picture perfect
    54 pts
    @JasonADal

    Hi Pip – This is something I’ve done quite often with my courses. It may be easier to create a variable that adds to a count each time a question is answered correctly. For example on each Submit button, you could add (in this order; X=the number of questions on the page):

    1. onClick Modify Variable “questions_correct” -> Add to variable  “1” IF Question_0001 is correct.
    2. onClick Change State -> Next -> enable  IF “questions_correct” = “X”
    3. onClick Change State -> Submit IF question_ooo1 is correct

    You may also want to change the onShow Set State action to account for a person having already visited a page. For example,

    1. onShow Set State -> Next -> disabled IF “questions _correct” < “X” ELSE Set State -> Next -> enabled
    2. onShow Set State -> Submit button 1 -> disable IF questions_correct = “X” (duplicate for each submit button)

    I’ve attached a sample with 3 questions that includes feedback for each question set up via the question itself. Hope this helps!

    #374491 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    209 pts
    @Klaatu

    Another method (Seem’s Tim beat me to the punch) that might be easier and quicker to set up (just duplicate the group and change the variable to modify for each question).

    If you still want to know why what you originally had doesn’t work then post it or a similar sample and I/we will look it over and provide feedback.

    Darrel

    Attachments:
    1. 4on1.zip
    #374629 Score: 0
    Profile photo of Pip Valleley
    Pip Valleley
    Member
    beginner
    intermediate
    profile
    Group Member
    wise owl
    curious george
    contributor
    friend finder
    1 pt
    @pvalleley3585

    Sorry I’m struggling to understand this. How do I send this page to you? Do I export it?  Unfortunately I cannot open the zip file.

    Pip

     

    #374632 Score: 0
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    355 pts
    @timk

    Hi,

    if you attach an On:Show action to the next button, this action will be run when the button is shown, i.e. for an initially visible button, when the page is loaded. This action won’t change the state of the button while the user is on the page answering the questions but it should change the state if a user returns to the page unless you reset the questions.

    Copy the action to each Submit button “On: Click” and you should be fine.

    Tim

    #374634 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    209 pts
    @Klaatu

    Pip, if you save the zip file and then right click it you should have an option to “Extract all”.

    To attach a copy for us to look over: Re-publish your non-working project and check create zip file in the options. Attach that zip file to a post.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.