## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")

## ----eval=FALSE---------------------------------------------------------------
# library(tutorizeR)
# 
# work_dir <- file.path(tempdir(), "tutorizeR-formats")
# 
# tutorize(file.path(work_dir, "lesson.Rmd"), output_dir = work_dir, format = "learnr", assessment = "both")
# tutorize(file.path(work_dir, "lesson.qmd"), output_dir = work_dir, format = "quarto-live", assessment = "code")

## ----eval=FALSE---------------------------------------------------------------
# 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
# )

## ----eval=FALSE---------------------------------------------------------------
# system("quarto add r-wasm/quarto-live")

## ----eval=FALSE---------------------------------------------------------------
# file.exists(learnr_report$output_file)
# file.exists(live_report$output_file)

