Free response questions and answers
I am designing an e-learning module with a free response question. It would be great if once the learner answers the question, their answer is compared to a bank of key words checking for accuracy. If the learner's answer includes the key words, "correct" appears; if their answer does not include the key words, "incorrect" and the correct response appears.
Is there a way to do this in Articulate?
9 Replies
Sure, you just need a trigger set to to check if TextEntry1 (or whatever your variable is called) is equal to ignore case term one or equal to ignore case term two, or equal to ignore case term three. If so, you'd show a layer with the word Correct on it.
You also want a second trigger that checks if the variable is not equal to those terms, this would be used if the learner answers incorrectly.
Does that make sense?
Hi Hugh,
Matthew's suggestion will work to check if your entry is 'equal to' whatever you decide is correct, but as far as I'm aware there is no way to ascertain if a text entry field 'contains' a particular key word or words among other words.
Louise
Good point Louise, I obviously didn't read the question thoroughly!
Instead, you could pass the contents of the variable to JavaScript and evaluate the contents that way.
See here for details.
Edit, I've updated the demo so now case sensitivity is not an issue.)
Thanks Matthew,
I wondered about Javascript but unfortunately only know it well enough to hack other peoples code! This is very useful. Thanks so much for posting the sample and the source.
I don't suppose you know a way to check the contents of a text entry field without needing to click a button or press a key? Maybe using a listener or some such thing?
Thanks again
Louise
It can be done, but the issue is that the variable isn't saved by Storyline until the text entry box loses focus. So at the very least you need to click away from the text entry box for it to work.
If you want to do it all in real time then you would have to create your own text entry field as part of a web object.
Thanks Matthew
It is a shame. It is difficult to create realistic system simulations in Storyline because of this issue. I find that when I need to create systems training I need to (unfortunately) go back to Captivate.
Hopefully it is something the developers have in their pipeline.
Louise
I know what you mean. Hopefully someone else here knows a way to work around this limitation (because I'm not ever going back to Captivate...)
It would be a good idea to submit a feature request.
Here is an update to the JavaScript used in the above example. This fixes the issue with case sensitivity, so now 'TOMATO', 'tomato' or 'ToMaTo' are all considered acceptable answers.
I've updated the files linked above.
Great discussion here! I just wanted to stop in and note for those who may not be aware, if you opt to use JS, that is not something for which we would be able to provide support, but we have lots of members here in the community who are typically more than happy to assist. Here also is our JS Best Practices sheet, as well. :)