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
  • 718 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 18, 2016

I'm using CP9. On success I execute advanced action. I have infinite attempts checked. Yes, the variable associated with the TEB stores entered information and checks it with literal value on my advanced action. Does rewinding reset all TEBs and I will ahve enter answers again? Is there another way of doing this? Thanks!


Forgot to tell that you can increase the time for the Success/Failure captions (look in Timing Properties panel).

If you choose Infinite attempts and validate the TEB (you still didn't specify that you Validate), the Failure action will never execute! That means that you only will see the Success objects ever. You misunderstand the action Success: if the TEB is NOT validated, that is the only action. Can you confirm that you do not use validation, and post the real conditional action? Use the Preview button  in the Advanced Actions dialog box (top right, first button of the control panel which looks like a Play button). Also post a screenshot of the timeline, because I have no idea how many TEB's are on that slide. Do you have to attribute a score to the TEB's? If not, maybe it would be easier to use the Scrolling Text interaction, which is not interactive and you don't have an active/inactive part.