Defines the options for running a given test.

test_options(title, admin_password, researcher_email = NULL,
  max_num_participants = NULL, demo = FALSE, languages = "EN",
  log_error = TRUE, show_full_error_msg = TRUE, notify_error = FALSE,
  notify_new_participant = FALSE, pushbullet_email = NULL,
  pushbullet_apikey = NULL, max_participants_msg = NULL,
  server_closed_msg = NULL, problems_info = "default",
  theme = shinythemes::shinytheme("yeti"), auto_p_id = TRUE,
  enable_resume_session = TRUE, allow_any_p_id_url = FALSE,
  force_p_id_from_url = FALSE, enable_admin_panel = TRUE,
  output_dir = "output", session_timeout_min = 7 * 24 * 60,
  clean_sessions_interval_min = 15, logo = NULL, logo_width = NULL,
  logo_height = NULL)

Arguments

title

The test's title. This can either be an unnamed character scalar, in which case the same title will be shown irrespective of internationalisation, or a named vector of titles with the names corresponding to language codes.

admin_password

Password to access the admin panel.

researcher_email

Researcher's email; used in participant help message.

max_num_participants

Maximum number of participant completes before the test automatically closes (excludes pilot participants as indicated through the admin panel).

demo

Whether the test is to be run in demo mode.

languages

Character vector of languages that may be selected via the URL parameter 'language'. If no language is provided by the URL parameter, defaults to the first language in this vector. Languages should be encoded according to ISO 639-2 conventions.

log_error

Whether to log errors (this feature is under development).

show_full_error_msg

Whether to show full error messages.

notify_error

Whether to send a Pushbullet message when the test experiences an error (this feature is under development).

notify_new_participant

Whether to send a Pushbullet message when a new participant completes the test.

pushbullet_email

Email to send Pushbullet notifications to.

pushbullet_apikey

Pushbullet API key (see https://www.pushbullet.com/).

max_participants_msg

Message to display when the participant quota is reached (NULL gives default).

server_closed_msg

Message to display when the server is closed via the admin panel (NULL gives default).

problems_info

Message to display at the bottom of the screen with advice about what to do if a problem occurs. The default value, "default", gives a standard English message including the researcher's email (if provided). Alternatively, the argument can be an unnamed character scalar providing an non-internationalised message, or a named vector of internationalised messages with the names corresponding to language codes.

theme

Shiny theme: see e.g. the shinythemes package.

auto_p_id

Whether or not to automatically generate an ID for each participant.

enable_resume_session

Whether to allow participants to resume sessions by refreshing the page.

allow_any_p_id_url

Whether to allow new participants to give themselves an arbitrary participant ID by passing it as a URL parameter.

force_p_id_from_url

Whether to force new participants to provide their participant ID as a URL parameter.

enable_admin_panel

Wheter to enable the admin panel.

output_dir

String identifying psychTestR's output directory.

session_timeout_min

Minimum time until a participant's session times out (minutes).

clean_sessions_interval_min

How often should psychTestR check for expired participant sessions (minutes).

logo

Path to a logo to display in the header (optional).

logo_width

Logo width, e.g. "100px".

logo_height

Logo height, e.g. "50px".