This vignette helps instructors decide whether to target
learnr or quarto-live when converting existing
R Markdown or Quarto material.
Use learnr when the course already supports RStudio or
Shiny-based tutorials and when gradethis feedback is
useful. Use quarto-live when browser-based execution is
preferred and the teaching project has the Quarto live extension
installed.
library(tutorizeR)
example_dir <- system.file("examples", "example_course_module", package = "tutorizeR")
work_dir <- file.path(tempdir(), "tutorizeR-formats")
dir.create(work_dir, recursive = TRUE, showWarnings = FALSE)
file.copy(file.path(example_dir, "lesson-source.qmd"), work_dir, overwrite = TRUE)
file.copy(file.path(example_dir, "student_activity.csv"), work_dir, overwrite = TRUE)
qb <- load_question_bank(file.path(example_dir, "question-bank"))
learnr_report <- tutorize(
input = file.path(work_dir, "lesson-source.qmd"),
output_dir = work_dir,
format = "learnr",
assessment = "both",
question_bank = qb,
overwrite = TRUE,
verbose = FALSE
)
live_report <- tutorize(
input = file.path(work_dir, "lesson-source.qmd"),
output_dir = work_dir,
format = "quarto-live",
assessment = "both",
question_bank = qb,
overwrite = TRUE,
verbose = FALSE
)When targeting quarto-live, install the extension in the
teaching project:
Generated output should be reviewed in the environment where students will use it, because package availability and browser execution settings can differ.