Skip to main content
xiaolung_7
Participating Frequently
July 17, 2016
Question

TEB validation action on succes and on failure

  • July 17, 2016
  • 1 reply
  • 716 views

Hi community!

My project is on CP9. I have a text entry box. I want to enable a caption saying "wrong" if the entered text is not what is expected. On the other hand, enable caption saying "true" if the entered text is true. I have created an advanced action for this purpose. The problem is, when the entered text is wrong the caption saying "wrong" shows up, but when I delete the text and input the true answer it does not work. The caption "wrong" still maintains on the screen. How can I make the TEB check for its entry multiple times, like if I enter wrong answer the caption "wrong" appears, if I enter right answer the caption "true" appears and caption "wrong" disappears.

Thanks in advance!

Cheers!

Xiaolung

This topic has been closed for replies.

1 reply

Lilybiri
Legend
July 17, 2016

Is there a specific reason why you do not use the built in Success and Failure captions? If the TEB is validated, which should be the case since you talk about 'wrong' and 'correct' entries, you can use those captions the same way as for other interactive objects and question slides.

If you want indeed to have other captions, you'll need to use an advanced action for the Success event, which hides the 'wrong' caption and shows the 'correct' caption.

xiaolung_7
Participating Frequently
July 17, 2016

Thank you Lilybiri​!!!

Built in Success and Failure captions disappear after a while. I am using several TEBs, and I wanted captions to stay on the screen.

However, now I changed my mind and want green and red shapes instead of "true" and "wrong" captions. I want green shape to appear if the entry is true and red shape to disappear(if there was a wrong entry before); red shape appear if the entry is wrong and green shape disappear. I tried with advanced action(conditional) saying:

if "variable" is equal to "true"

   show green_shape

   hide red_shape

if "variable" is not equal to "true"

   show red_shape

   hide green_shape

For the first entry it works. Like if I input true answer and press Enter on the keyboard the green shape appears, but when I press the "Backspace" on the keyboard to delete the true answer and type another text and press Enter it does not work. The same happens vice versa, I mean trying with wrong answer and then true answer.

Please help me!

Lilybiri
Legend
July 17, 2016

Which version are you using? Which event's) do you use to trigger that conditional action? You probably have to rewind the playhead so that it is before the pausing point to allow a new entry. How many attempts do you indicate for the TEB? How did you define that 'variable'? Normally the variable associated with the TEB will get as value the entry, not True or False.