Skip to content

Instantly share code, notes, and snippets.

@smathot
Created September 18, 2012 15:00
Show Gist options
  • Select an option

  • Save smathot/3743592 to your computer and use it in GitHub Desktop.

Select an option

Save smathot/3743592 to your computer and use it in GitHub Desktop.
Forum help script
# Ref: <http://forum.cogsci.nl/discussion/198>
# This script should be placed in the prepare phase of an inline_script, before
# the open_question item.
#
# First retrieve the full path to a file called 'question.txt' in the file pool
path = exp.get_file('question.txt')
# Read the entire contents of the file.
question = open(path).read()
# Set the variable, so that the open_question item can use it.
exp.set('_question', question)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment