Hide "Submit" Button - Test & Survey

pthomas1378
pthomas1378 Community Member Posts: 32
Hello,

When an individual answers a question and reaches maximum attempts I would like the "Submit" button to be hidden.

I'm not able to see how to identify the variable and/or  target the question "complete statues" so the submit button will hide.  I know there should be some type of variable used for the system to ID when max attempts is reached.  I would like to utilize this to also hide the "Submit" button as well.

Or

Is there a better way to approach this?

 

Keep in mind I would like to make reusability of the function very friendly.

Thanks,

P Thomas

 

Comments

  • wendymiller
    wendymiller Community Member Posts: 244
    Hi Paul,

    Is there a reason that you could not just enable the Max Attempts Feedback for the question to run an action group to hide buttons or whatever else you want to do? See attached.
  • klaatu
    klaatu Community Member Posts: 988
    Create a variable called tryCount set  it to 0(zero).

    add a mouse click action to the submit button and select modify a variable. Target:tryCount , Type: Add to Variable, Value:1.

    Add another mouse click action to the submit button and select Hide. Target:Submit and add a condition - Variable: tryCount, Relationship: Equal to, Value:3 (or whatever your try limit is set to). Make sure the dropdown is set to "All conditions must be true".

    That should do it. Example attached. Hope this helps.

    Darrel

     
  • pthomas1378
    pthomas1378 Community Member Posts: 32
    Thanks all...
  • tecocat
    tecocat Community Member Posts: 389 ♪ Opening Act ♪
    I have a related question... I'm trying to use Lectora's built-in quiz-question functionality for a change (instead of building my own, like I usually do), and I, too, need to know if there's any way I can address the "max attempts" variable. I'm trying to use the "max attempts" functionality to determine when to just tell the learner the answer (after three tries, here's the answer), but I don't really want it to "lock up" the question. (In other words, I'd like the learner to be able to take the info that she sees in the answer feedback and use it to re-answer the question, if she wants, to help her make sure that she understands the answer she's been given and to give her that kinesthetic learning experience.). I don't want to simply reset the question, because I'm using the whether the question is "empty" or not "empty" to determine some other functionality on the page.

    So, if I knew what the name of the variable was that tracked when the learner hits the maximum number of attempts, I could add an action to the maximum attempt reached actions that would reset that variable back to "0" or "not reached" or something like that.

    I know how to build all manually (i.e., not using the built-in feedback mechanisms), but I'd like to know whether this could be done while using the built-in mechanisms.

    Thanks, in advance, for any help! :)
  • tecocat
    tecocat Community Member Posts: 389 ♪ Opening Act ♪
    (Hmmm...wanted to edit the above post to add something, but the Edit option seems to have disappeared now...)

    Also, I'd like to be able to use that variable as a test condition...learners can continue IF they either got the question right OR they reached the max attempt (and, therefore, were given the answer).

    This is the kind of functionality I've always included when I created quiz questions more manually...I just thought that maybe Lectora had finally "matured" their built-in quiz-question functionality enough that I could just use that instead. :(
  • jvalley4735
    jvalley4735 Community Member Posts: 1,357
    Just wanted to clarify, we have a timeout feature turned on since the forums are linear based.  You should be able to edit any post within 5 minutes after submitting it.  However as soon as the time runs out or someone else comments on the thread you'll no longer be able to. This helps to make sure people are reading the most up to date comments.
  • klaatu
    klaatu Community Member Posts: 988
    The variable used is VarTriQA_X where the X is replaced by the number in the HTML Name of the question.
    For instance, if the HTML Name is qu883 the variable to get would be VarTriQA_883 (just add the numbers).

    Try this:
    add a button on a page with a question. On click of the button run the following script (replacing the X as instructed above).
    counter=VarTriQA_X.getValue();
    alert(counter);

    Pretty cool, huh? With this you should be able to do whatever you need. For instance, lets say you made a variable in Lectora called answerCount and initially set it to 0. Adding the following to a submit button will increment it each time a try is made.

    counter=VarTriQA_X.getValue();
    VaranswerCount.set(counter);

    You can then use answerCount as you would any other Lectora variable. I hope I explained this adequately and you can use it.

    Darrel
Sign In or Register to comment.

So You Wanna Be An eLearning ROCKSTAR?

We're all fans of eLearning here! Want to become an eLearning ROCKSTAR? Just click on one of the buttons below to start your rocking journey!