Stores expected student identifiers in the students table. Registered
students can be used by track_attempt() to reject attempts from unknown
identifiers when require_registered_student = TRUE.
Usage
register_students(con, students, timestamp = Sys.time())Arguments
- con
A DBI connection.
- students
A data frame with a required
student_idcolumn and optionalstudent_label,email, andgroup_idcolumns. A character vector is treated as a vector of student identifiers.- timestamp
Creation timestamp for inserted rows. Defaults to
Sys.time().
Examples
db_path <- tempfile(fileext = ".sqlite")
con <- init_tracking_db(db_path, overwrite = TRUE)
register_students(
con,
data.frame(
student_id = c("student_001", "student_002"),
group_id = c("A", "A")
)
)
#> # A tibble: 2 × 5
#> student_id student_label email group_id created_at
#> <chr> <chr> <chr> <chr> <chr>
#> 1 student_001 student_001 NA A 2026-06-24T12:25:18Z
#> 2 student_002 student_002 NA A 2026-06-24T12:25:18Z
DBI::dbDisconnect(con)