Scope
This vignette introduces the course pilot example included with
learnrTrackR. The pilot is a simulated descriptive
statistics tutorial with tracked learnr questions, tracked
gradethis code exercises, CSV and YAML configuration files,
explicit student and teacher launch scripts, and teacher outputs.
The data are simulated. They are intended only for testing the tracking workflow.
Locate the example
library(learnrTrackR)
example_dir <- system.file("examples/course-pilot", package = "learnrTrackR")
example_dir
#> [1] "/tmp/Rtmpktuqs0/temp_libpath19a65a519f54/learnrTrackR/examples/course-pilot"The directory contains:
list.files(example_dir)
#> [1] "config" "config-csv"
#> [3] "inspect-results.R" "pilot-checklist.md"
#> [5] "pilot-data.R" "pilot-protocol.md"
#> [7] "pilot-record-template.md" "pilot-workflow.R"
#> [9] "README.md" "run-student.R"
#> [11] "run-teacher.R" "simulate-results.R"
#> [13] "student.env.example" "teacher.env.example"
#> [15] "tracking-strategy.md" "tutorial.Rmd"Read the configuration
config_dir <- file.path(example_dir, "config-csv")
yaml_config <- file.path(example_dir, "config", "tracking.yml")
config <- read_tracking_config(config_dir)
yaml_config_data <- read_tracking_config(yaml_config)
config$courses
#> # A tibble: 1 × 3
#> course_id course_label semester
#> <chr> <chr> <chr>
#> 1 stat_intro Introduction to statistics with R pilot
config$tutorials
#> # A tibble: 1 × 4
#> tutorial_id course_id tutorial_label version
#> <chr> <chr> <chr> <chr>
#> 1 stat_descriptive_pilot stat_intro Descriptive statistics pilot tutori… 0.2.0
config$students
#> # A tibble: 4 × 4
#> student_id student_label email group_id
#> <chr> <chr> <lgl> <chr>
#> 1 student_demo Demo learner NA A
#> 2 student_a01 Student A01 NA A
#> 3 student_a02 Student A02 NA A
#> 4 student_b01 Student B01 NA B
config$questions
#> # A tibble: 6 × 5
#> tutorial_id question_id question_label question_type max_score
#> <chr> <chr> <chr> <chr> <dbl>
#> 1 stat_descriptive_pilot q1_variable_type Identify a qu… radio 1
#> 2 stat_descriptive_pilot q2_robust_summa… Choose robust… checkbox 1
#> 3 stat_descriptive_pilot q3_n_rows Count data ro… numeric 1
#> 4 stat_descriptive_pilot q4_highest_medi… Identify the … text 1
#> 5 stat_descriptive_pilot q5_mean_study_h… Compute mean … code 1
#> 6 stat_descriptive_pilot q6_region_summa… Summarise stu… code 2
yaml_config_data$tutorials
#> # A tibble: 1 × 4
#> tutorial_id course_id tutorial_label version
#> <chr> <chr> <chr> <chr>
#> 1 stat_descriptive_pilot stat_intro Descriptive statistics pilot tutori… 0.2.0Launch the tutorial locally
The tutorial itself is not launched during vignette rendering. To run it locally:
Sys.setenv(
LEARNRTRACKR_DB = file.path(tempdir(), "learnrtrackr-course-pilot.sqlite"),
LEARNRTRACKR_STUDENT_ID = "student_demo",
LEARNRTRACKR_GROUP_ID = "A"
)
learnr::run_tutorial(
file.path(example_dir, "tutorial.Rmd"),
clean = TRUE,
as_rstudio_job = FALSE
)Simulate a cohort
The example also includes a script that records simulated attempts for a small cohort. This is useful for checking exports and reports without using the browser.
Inspect teacher outputs
After running the tutorial or the simulation:
The inspection script writes attempts, scores, gradebook rows,
Moodle-ready grades, Canvas Gradebook grades, a rich export bundle, and
an HTML teacher report when rmarkdown is available.
Dashboard
The same database can be opened with the local teacher dashboard:
run_dashboard(Sys.getenv("LEARNRTRACKR_DB"), group_id = "A")The dashboard is a local inspection interface for prototypes. It does not replace institutional authentication.