Copy link to clipboard
Copied
Hi
I have a course where the user must answer a question by typing in an answer containing certain words. When the feedback for correct answers show I would like to display what the user have typed in.
Example: Your answer "the users answer" is verry good. The answer "........." would also have been correct.
I would like this to show up inside a text box that is triggered to show if the words are in the answer using advanced action.
1 Correct answer
Long time ago I wrote a blog post about creating such a condition testing if a variable contains some words, but it was still in the SWF period, which means that the example output is not displaying anymore. Here is the link:
https://blog.lilybiri.com/custom-short-answer-question
I try to explain a possible workflow in short:
- Create a multistate shape SS_Output with two states: first is empty, second has the variable associated with the Text Entry Box, which I will rename here to v_entry. Bew
Copy link to clipboard
Copied
Bit vague. Did you use one Text Entry Box or multiple TEBs? Each TEB has an associated variable, and you could use the 'contain' operator to find some words in the variable. Please give some more details, I have lot of examples on my blog about using and displaying variables. I may be able to help but I need more details. Why not post screenshots of the slide and explain based on that screenshot.
Copy link to clipboard
Copied
I will try to explain a bit more 🙂 But the concept is easy.
The user types in a text in the TEB
I would like to display that text in another textbox that pops up if the user include certain words in the answer.
Copy link to clipboard
Copied
Long time ago I wrote a blog post about creating such a condition testing if a variable contains some words, but it was still in the SWF period, which means that the example output is not displaying anymore. Here is the link:
https://blog.lilybiri.com/custom-short-answer-question
I try to explain a possible workflow in short:
- Create a multistate shape SS_Output with two states: first is empty, second has the variable associated with the Text Entry Box, which I will rename here to v_entry. Beware: when inserting the variable using the X button in the Character part of the shape, make sure to increase its length, because the default lenght of 50 will not be sufficient.
- I would prefer a Scrolling Text interaction over a TEB, but if you want a TEB, please make sure to activate the scroll bar and to resize the TEB.
- Advantage of the TEB is that it is an interactive object, which means that the Submit button (or its shortcut key) can trigger a Success action. TEB is not validated in this case.
- The Success event should trigger a conditional advanced (or shared) action, like this:
IF v_entry contains kaffe AND not sure if it is AND or OR?
v_entry contains og
Go to Next State SS_Output
Copy link to clipboard
Copied
Thank you. I will be using or to add different variations of the word.
Could I also use the $$v_entry$ to display the text in the state?
Something like
Your answer "$$v_entry$$" are good. Another correct answer would also be.......
Copy link to clipboard
Copied
Of course, but please ALWAYS use the X-button in the Character part to insert the variable (you typed it and missed the last $) because you will need to increase the length displayed. Maybe arrange to have the variable value in a separate paragraph.
I prefer using states, but you can also use Show for a hidden text container of course. Reason of my preference:
https://blog.lilybiri.com/tip-3-show-slash-hide-or-multistate-object-advanced-slash-shared-actions
As courtesy to other users looking for a similar solution, please mark the helpful answer as being correct.
![](/skins/images/80E26D03746AC774EA33073795F08C64/responsive_peak/images/icon_anonymous_message.png)
![](/skins/images/80E26D03746AC774EA33073795F08C64/responsive_peak/images/icon_anonymous_message.png)