fetch_unenrolled_users: Fetch users who unenrolled from a course

Description Usage Arguments Details Value See Also

Description

Unenrolled users were enrolled at one point in time, but they were later unenrolled. The function parameters below allow filtering based on the initial enrollment record. Some information is lost when users are unenrolled (see Details below), so be sure to check that you can get the information you need for your analysis.

Usage

1
2
fetch_unenrolled_users(course_id, methods = NULL, after = NULL,
  before = NULL, ..., con = get_session_con())

Arguments

course_id

A single integer corresponding to a courseid in the database.

methods

Vector of strings specifying which enrollment methods to include. A NULL value allows all enrollment methods.

after

A single UNIX datetime in any format that can be cast to a lubridate datetime object. Enrollments before this time will be excluded. A NULL value will not apply this filter.

before

A single UNIX datetime in any format that can be cast to a lubridate datetime object. Enrollments on and after this time will be excluded. A NULL value will not apply this filter.

...

Potential future args.

con

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

Details

Unenrollment usually occurs at the request of the user and is usually performed by an administrator.

When a user is unenrolled, their entry in the enrollments table is removed. A variety of other information is also removed, such as group assignments in the groups_members table. Logstore events and enrollment survey responses are the exception. They are preserved in the database and can be traced to recall lost information, such as enrollments and group assignments. This package supports tracing enrollment logs for the identification of unenrolled users. However, this package does not support tracing other types of logs for unenrolled users, because they are not often studied. Unenrolled users are identified by a combination of the presence of a logstore enrollment event and the absence of a record in the enrollments table.

In the logstore, the relateduserid column specifies the enrolled user and the userid column specifies the actor, which could be the enrolled user if enrolled by survey or an administrator if enrolled manually. Similar to the enrollments table, there may be multiple enrollments for a single user in a course. This function focuses on the first entry, similar to fetch_enrolled_users.

Examples in course 72 are user 16129 and 15931.

Value

Tibble of users unenrolled from the course.

See Also

fetch_enrolled_users


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