[open] Questionnaire Functionality
Hi Sebastiaan,
Is it possible to import text into a variable from a text file in the file pool using the open_question plugin? I have succeeded with the text_display plugin but it does not seem to be working in a questionnaire.
Thanks
Anthony

Comments
Hi Anthony,
Sure! First, you need to set the question field of the open_question item to [_question]. There are a few odd things here:
To read the question from a text file, you can use a script like this (see the code comments):
[gist:3743592]
This script is clearly the most simple case, in which there is a single text file in the file pool, which contains a single question. For more sophisticated text handling, you could take a look at functions such as numpy.loadtxt().
Good luck!
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!