Welcome to ClientVPS Mirrors

Converting a Quarto Lesson into an Interactive Tutorial

Converting a Quarto Lesson into an Interactive Tutorial

Many instructors prepare lessons in Quarto because it supports narrative, executable code, figures, tables, and reproducible publishing. tutorizeR keeps that authoring workflow intact while producing an interactive tutorial for students.

Source lesson

A source .qmd lesson can contain narrative text, setup code, examples, and MCQ blocks:

---
title: "Weekly study patterns"
---

## Learning goal

Students will summarize study time and relate it to quiz performance.

```r
library(tidyverse)
activity <- readr::read_csv("student_activity.csv")
```

```r
activity |>
  group_by(program) |>
  summarise(mean_hours = mean(study_hours), .groups = "drop")
```

```yaml
question: "Which summary is most appropriate for comparing programs?"
answers:
  - text: "Mean study hours by program"
    correct: true
  - text: "The first row of the data"
    correct: false
```

Conversion

library(tutorizeR)

work_dir <- file.path(tempdir(), "quarto-lesson")
output_dir <- file.path(work_dir, "generated")

report <- tutorize(
  input = file.path(work_dir, "lesson-source.qmd"),
  output_dir = output_dir,
  format = "learnr",
  assessment = "both",
  overwrite = TRUE
)

print(report)

Quarto live output

For browser-executable Quarto output, target quarto-live:

library(tutorizeR)

work_dir <- file.path(tempdir(), "quarto-lesson")
output_dir <- file.path(work_dir, "generated")

report <- tutorize(
  input = file.path(work_dir, "lesson-source.qmd"),
  output_dir = output_dir,
  format = "quarto-live",
  assessment = "code",
  overwrite = TRUE
)

print(report)

The quarto-live workflow requires the Quarto live extension in the teaching project. That dependency is intentionally not vendored by tutorizeR.

Need a high-speed mirror for your open-source project?
Contact our mirror admin team at info@clientvps.com.

This archive is provided as a free public service to the community.
Proudly supported by infrastructure from VPSPulse , RxServers , BuyNumber , UnitVPS , OffshoreName and secure payment technology by ArionPay.