Changes

Jump to navigation Jump to search
m
E.vandenberge moved page Demo Psychopy to Help:LimeSurvey/Demo Psychopy without leaving a redirect
Line 1: Line 1:  
== Demo entering a survey after a Psychopy experiment ==
 
== Demo entering a survey after a Psychopy experiment ==
   
Make sure your survey has a token table which contains the participant ID's:
 
Make sure your survey has a token table which contains the participant ID's:
    
[[File:token.png]]
 
[[File:token.png]]
 +
 +
Then, after your experiment has finished, start a web browser showing the survey.
 
  <nowiki>
 
  <nowiki>
 
participantID = 2
 
participantID = 2
 
url = "https://survey.socsci.ru.nl/index.php/survey/index/sid/459278/newtest/Y/lang/en?token={:d}".format(participantID)
 
url = "https://survey.socsci.ru.nl/index.php/survey/index/sid/459278/newtest/Y/lang/en?token={:d}".format(participantID)
 
import os
 
import os
 +
 
if sys.platform == 'win32':
 
if sys.platform == 'win32':
     # windows has no command to start the default browser, hope this one exists
+
     # open url with default browser
     os.system("chrome.exe "+url)
+
     os.system("start "+url)
 
else:
 
else:
 
     # this selects the default browser in most Unices
 
     # this selects the default browser in most Unices

Navigation menu