This vignette is an illustrative scenario. Actual classroom deployment is not verifiable from repository contents.
An instructor has a Quarto lesson on introductory data summarisation and visualization. The lesson contains narrative explanation, R chunks, a small dataset, and interpretation prompts. The instructor wants a student-facing tutorial with exercises, solution material, MCQs, and a conversion report without maintaining a separate tutorial by hand.
The instructor keeps lesson-source.qmd as the source of
truth. Generated learnr or quarto-live files
are outputs that can be regenerated after edits.
.qmd lessonInstructor comments inside R chunks control conversion:
The comments stay close to the source code, which helps course teams review the pedagogical intent of each chunk.
Inline MCQs are useful for lesson-specific checks. Question-bank references are useful when a concept should be reused across modules.
tutorize()work_dir <- file.path(tempdir(), "tutorizeR-scenario")
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"))
report <- tutorize(
input = file.path(work_dir, "lesson-source.qmd"),
output_dir = work_dir,
format = "learnr",
assessment = "both",
question_bank = qb,
mcq_source = "mixed",
overwrite = TRUE,
verbose = FALSE
)print(report)
write_tutorize_report(
report = report,
file = file.path(work_dir, "conversion-report.json"),
format = "json"
)The report helps an instructor check how many exercises, solutions, and MCQs were generated. It also records warnings and lint summaries.
The instructor should open the generated file and verify:
The package creates local artifacts. Publishing depends on the
teaching environment. Instructors may render learnr
tutorials, distribute Quarto output, or use generated reports in course
release workflows. Direct LMS publication is not implemented in the
current version.
This workflow demonstrates feasibility and reproducibility, not measured learning impact.