Spaces:
Running
Running
Commit History
-
One switch for which study, a night entry point, and readable TriPM columns
?study=dyad or ?study=sona replaces dyad_mode and a separate sona parameter. Two flags could disagree: a dyadic consent form with a SONA ending, or the reverse. SONA is the default, since nobody should be asked about their child unless the link says this is that study. ?start=night enters a night block directly. Checking a night change previously meant playing both day blocks first, because start=harvest skips only the front matter and there was no entry point further in. The TriPM columns are headed by their own statement rather than "TriPM item N". Row two of a Qualtrics export is the question text, so the file could not be read without a separate key beside it. The scoring key stays, since scale and reverse-keying are not in the statement.0d46751
-
Normalise the SONA completion URL so credit is actually granted
SONA grants credit from survey_code on the completion URL. A URL that reaches it without one silently credits nobody, and the researcher has three plausible ways to paste it: with the code templated, with an unsubstituted %SURVEY_CODE% (SONA rewrites the study link, not a parameter inside it), or with no code at all. Normalise all three instead of trusting the paste.4573fbe
-
Support SONA links: %SURVEY_CODE% pids and the completion redirect
SONA rewrites %SURVEY_CODE% per participant, so ?pid=%SURVEY_CODE% gives each person their own id. When the link is opened outside SONA the placeholder arrives unsubstituted, and taking it literally fails silently and expensively: everyone affected would share one pid, and so one condition, one seed, one trial order and one data directory, overwriting each other. Placeholders are rejected and the experimenter screen asks instead, which is the safe outcome. The final screen assumed an experimenter in the room. On SONA nobody is there and credit is granted by landing on SONA's completion URL, so ?sona=<url> adds a button plus an auto-forward, with the code shown as a fallback. Not addressed here, because it needs a decision rather than code: the task tells participants their credits become "real bonus money" and shows a dollar figure. That has to be true for the SONA sample too, or the text has to change.24bab97 -
Add dyad_mode, and make condition assignment survive a restart
SONA participants bring their own ids and can quit and restart at will. If a restart reassigns them, the counterbalancing is destroyed silently. The PsychoPy tasks solved this with the Pavlovia shelf: a persistent orderMap keyed by subject id, looked up before assigning anything new. Do it with determinism instead of shared state -- assignment is a pure function of the pid, so a reload, a refresh or a Space cold start all land on the same arm. Nothing is claimed, so there is no race between simultaneous arrivals and no counter to lose. This is the same reason _seed_from_pid had to stop using hash(). Two sources: allocation.csv for the planned study, where the split is exactly balanced because it was dealt in advance, and a hash of the id for ids that were never in the table, where balance is approximate as it is for any per-arrival randomisation. Ids outside the table do NOT pick up a night block from their hash unless the link asks, so a pilot link cannot silently acquire one. dyad_…1f942d5