Skip to contents

Stores tutorial metadata in the tutorials table.

Usage

register_tutorials(con, tutorials, course_id = NULL, timestamp = Sys.time())

Arguments

con

A DBI connection.

tutorials

A data frame with a required tutorial_id column and optional course_id, tutorial_label, and version columns. A character vector is treated as a vector of tutorial identifiers.

course_id

Optional course identifier used when tutorials does not include a course_id column.

timestamp

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

Value

A tibble of registered tutorials.

Examples

db_path <- tempfile(fileext = ".sqlite")
con <- init_tracking_db(db_path, overwrite = TRUE)
register_tutorials(con, "module_01", course_id = "stat101")
#> # A tibble: 1 × 5
#>   tutorial_id course_id tutorial_label version created_at          
#>   <chr>       <chr>     <chr>          <chr>   <chr>               
#> 1 module_01   stat101   module_01      NA      2026-06-24T12:25:18Z
DBI::dbDisconnect(con)