How to return user to content after incorrect knowlegde check response

Hello,


Using 11.2

I am trying to set up knowledge checks with submit variables that will do the following:

  • Process the question
  • Go to Next Page if the answer is correct
  • Go to content page (usually a video) if the answer is incorrect
  • Not do anything if the value is empty


What is happening is that, when I set these variables up, if I click on the Check Answer button without answering the question, it will direct me back to the content page that precedes the knowledge check, when I actually want it to do nothing but require the user to answer the question. I didnt' actually put in a variable/condition to do anything if the relationship is empty.


It's very frustrating. Any insight will be greatly appreciated.

Discussion (3)

It sounds like what's happening is your condition to to go to the knowledge check is something default that also satisfies the condition of an unanswered question. (i.e. the variable for the question has a default value of 0, the condition thus it is technically "answered")... but I'm just guessing based on what you said, so I could be wrong!


What you can do though, is use the variable that shows whether an answer is right, wrong, or unanswered as a Case. For example:

When the user clicks the Check Answer button these actions occur:

Modify Variable>v_answer>Set to>1>If answer is correct

Modify Variable>v_answer>Set to>2>If answer is wrong



basically this way the user will only be able to set the variable to 1 or 2 (right or wrong) if they answer the question, anything else will not modify the variable. A key thing to make sure of, is that the variable has a default value of something other than 1 or 2 (usually Lectora has a default value of 0)


You then have actions which direct the user to the proper page, on the condition of what the variable v_answer is. Such as v_answer = 1, go to correct page; v_answer = 2, go to wrong page; v_answer /= 1 or 2, do something for unanswered question.


Maybe this is what you're already doing, and it's still not working. But the above should work, if not let me know!

Altarium, thank you for the thoughtful response. The same had occurred to me as well, but I was hoping to find a way to avoid all of that development!


Tim...your solution works like a charm!

A question that is empty is always valued as "incorrect". What you can do to accomplish your task is:


1. Create a group with one action

Action: Go to

Target: Next page

Condition: Only if question_# is correct

Else: Goto

Target: Your content page


2. Add an action to your button

On: Click

Action: Run Action Group

Target: Above group

Condition: Only if question_# is not empty


Tim

Discussions have been disabled for this post