Skip to contents

Stores course metadata in the courses table.

Usage

register_courses(con, courses, timestamp = Sys.time())

Arguments

con

A DBI connection.

courses

A data frame with a required course_id column and optional course_label and semester columns. A character vector is treated as a vector of course identifiers.

timestamp

Creation timestamp for inserted rows. Defaults to Sys.time().

Value

A tibble of registered courses.

Examples

db_path <- tempfile(fileext = ".sqlite")
con <- init_tracking_db(db_path, overwrite = TRUE)
register_courses(con, data.frame(course_id = "stat101", semester = "W2026"))
#> # A tibble: 1 × 4
#>   course_id course_label semester created_at          
#>   <chr>     <chr>        <chr>    <chr>               
#> 1 stat101   stat101      W2026    2026-06-24T12:25:18Z
DBI::dbDisconnect(con)