fetch_enroll_survey: Fetch enrollment survey responses

Description Usage Arguments Details Value See Also

Description

Get responses to survey questions asked during course enrollment.

Usage

1
2
fetch_enroll_survey(esurvey_id, user_ids, shape = "wide", ...,
  con = get_session_con())

Arguments

esurvey_id

A single integer corresponding to an enrollment survey id in the database. This is NOT a course module id, because enrollment surveys are not course modules.

user_ids

A vector of integers corresponding to userids.

shape

A single string specifying what shape the returned data should have. "wide" output has one row per input userid and a column for each question. "long" output has one row per question response and multiple columns of information.

...

Potential future args.

con

A database connection object, using the session connection by default.

Details

If there are multiple submissions of the same survey for the same course by the same user, then the most recent is returned. Not sure why there are duplicates. It might occur when a user edits a survey response from their account settings, or when they click the submit button twice before the page finishes loading.

Value

A tibble with enrollment survey responses.

See Also

view_enroll_survey


TheFridayInstitute/fimoodler documentation built on May 28, 2019, 9:37 a.m.