Experiment and Session Inheritance - wiso-forschungslabor/hroot-documentation GitHub Wiki
Experiment & Session Configuration: Duplication, Inheritance, and Context-Sensitivity
1. Duplicating Experiments
When preparing similar, iterative, or follow-up studies, entire experiments can be duplicated with a single click:
- Action: "Duplicate experiment" (
Experiment duplizieren) located in the floating action bar and left navigation sidebar of the experiment. - Scope: Copies all basic and advanced settings, treatments (including participant targets), quota definitions, milestones, tags, and experimenter permissions.
- Permissions: Available to users with edit permissions on the experiment who also have experiment creation rights (
can_create_experimentor Admin). - Result: The new experiment is created with a
(Copy)suffix, and edit mode opens immediately.
2. Context-Sensitivity (Dynamic Field & Tab Visibility)
To keep setup focused and avoid input confusion, configuration forms dynamically adapt to the selected experiment type (present, online, survey) and admission mode (classic, qr_code, waiting_room, survey):
In Experiment Settings:
- Laboratory In-Person Experiment (
presentwith classic or QR admission):- Tab 5 ("Survey & Queue") is completely hidden.
- Synchronous Online Experiment (
online):- Tab 5 is labeled "Online Waiting Room & Live".
- Only panels relevant to waiting room parameters, lottery draws, live queues, chat, and device restrictions are displayed.
- Online Survey (
survey):- Tab 5 is labeled "Survey & Privacy".
- Only survey configuration panels (target URLs, tokens, timeout, rotation strategy), device restrictions, and privacy policies are displayed; waiting room and live draw panels remain hidden.
- Room/location selection and physical setup/cleanup duration fields are hidden.
In Session Settings:
- The list of available admission types (
admission_type) is pre-filtered based on the parent experiment's type (e.g. onlyclassicandqr_codeare offered for in-person studies). - Online & Survey Sessions:
- Room selection is hidden (default room Internet is automatically assigned).
- Cash payout option (
cash_payout_active) is hidden. - Setup and cleanup time buffers are hidden.
- Survey Sessions:
- Team assignment boxes, reserve seats, category pickers, and physical session text boxes are hidden.
- Waiting Room Sessions:
- Waiting room settings (opening lead time, lottery duration, show-up fee, quota mode, target URLs) are dynamically exposed.
3. Automatic Inheritance of Experiment Settings into New Sessions
When creating a new session (SessionsController#new), parent configuration values from the experiment are automatically inherited into the new session's attributes and pre-filled in the form:
Inherited Attributes:
- General: Public title (
public_name), admission type (admission_type), registration deadline (registration_deadline), duration (duration), needed participants (needed), group size (group_size). - Finance & Payouts: Payment type (
payment_type_id), donation payment type (donation_payment_type_id), voucher pool (voucher_pool_id), session payout (session_payout), show payout amount (show_session_payout), rounding mode (session_round_up), payout increment (session_payout_increase). - Online & Surveys: Token source (
token_source), survey duration timeout (survey_timeout_minutes), external destination URL (external_survey_url), device restrictions (allow_smartphones,allow_tablets). - Waiting Room & Queue: Opening and closing times, reading buffer, draw duration, show-up fee, draw mode, draw delay, and queue compensation/limits.
- Instructions: Room description, participant restrictions, and special instructions.
Visual Form Indicators:
- Every inherited form field is marked with a retweet icon (
glyphicon-retweet). - Hovering over the icon displays a tooltip: "Inherited from experiment settings. Can be overridden for this specific session."
- Values are pre-populated and fully editable, allowing experimenters to accept experiment defaults immediately or customize values per session as needed.