Back
Login
Register
Login
Register
Millisecond Forums
Home
»
Millisecond Forums
»
Inquisit 4
»
RE: Session IDs?
Session IDs?
Post Reply
Like
36
Session IDs?
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
jdb
jdb
posted 7 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 6,
Visits: 18
I am running a web script. I want participants to manually enter their IDs. I also want to send a "session ID" through the URL, e.g.,
http://research.millisecond.com/example/myexperiment.web?sessionid=1
Can I do this? Will it be recorded? And, more importantly, can I access that info in the script? I'd like to be able to say "present stimuli from this list for session 1 but this other list for session 2." Seems pretty easy, but I can't figure it out.
Reply
Like
36
Dave
Dave
posted 7 Years Ago
ANSWER
Post Details
Share Post
Group: Administrators
Posts: 13K,
Visits: 104K
+
x
jdb - Monday, February 13, 2017
I am running a web script. I want participants to manually enter their IDs. I also want to send a "session ID" through the URL, e.g.,
http://research.millisecond.com/example/myexperiment.web?sessionid=1
Can I do this? Will it be recorded? And, more importantly, can I access that info in the script? I'd like to be able to say "present stimuli from this list for session 1 but this other list for session 2." Seems pretty easy, but I can't figure it out.
You can configure the web experiment up to read the "sessionid" query parameter and use it as the script's group id via the web experiment's settings (in the Subject ID's step). The value of the query parameter (e.g. 1 or 2) will be recorded in the data file's 'group' column, and you can access the parameter's value via the script.groupid property, i.e.
> I'd like to be able to say "present stimuli from this list for session 1 but this other list for session 2."
If you set up your script to treat this as a standard between-subjects condition, you can base the assignment on the session id provided by the query parameter:
<expt list1>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
...
</expt>
<expt list2>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
...
</expt>
If used as group id, you can access the value of the query parameter at any time in the script via the script.groupid property:
<text sessionid>
/ items = ("The provided session ID is <%script.groupid%>.")
</text>
Reply
Like
32
jdb
jdb
posted 7 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 6,
Visits: 18
+
x
Dave - Monday, February 13, 2017
+
x
jdb - Monday, February 13, 2017
I am running a web script. I want participants to manually enter their IDs. I also want to send a "session ID" through the URL, e.g.,
http://research.millisecond.com/example/myexperiment.web?sessionid=1
Can I do this? Will it be recorded? And, more importantly, can I access that info in the script? I'd like to be able to say "present stimuli from this list for session 1 but this other list for session 2." Seems pretty easy, but I can't figure it out.
You can configure the web experiment up to read the "sessionid" query parameter and use it as the script's group id via the web experiment's settings (in the Subject ID's step). The value of the query parameter (e.g. 1 or 2) will be recorded in the data file's 'group' column, and you can access the parameter's value via the script.groupid property, i.e.
> I'd like to be able to say "present stimuli from this list for session 1 but this other list for session 2."
If you set up your script to treat this as a standard between-subjects condition, you can base the assignment on the session id provided by the query parameter:
<expt list1>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
...
</expt>
<expt list2>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
...
</expt>
If used as group id, you can access the value of the query parameter at any time in the script via the script.groupid property:
<text sessionid>
/ items = ("The provided session ID is <%script.groupid%>.")
</text>
Thanks for the response! I'll give it a try.
Reply
Like
36
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
36
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Facebook
Explore
Messages
Mentions
Search