Skip to contents

Renders a small HTML report for one tutorial using question summaries, student summaries, difficult-question flags, and stalled-student flags.

Usage

generate_teacher_report(
  con,
  path,
  tutorial_id,
  rule = c("last", "best", "first"),
  include_unregistered = TRUE,
  group_id = NULL,
  max_mean_percent = 60,
  max_student_percent = 60,
  min_students = 1,
  min_attempts = 1,
  quiet = TRUE
)

Arguments

con

A DBI connection.

path

Output HTML file path.

tutorial_id

Tutorial identifier. Required.

rule

Scoring rule passed to summarise_questions() and summarise_students().

include_unregistered

If TRUE, include attempted questions not registered with register_questions().

group_id

Optional registered student group identifier.

max_mean_percent

Maximum mean question percent used by detect_difficult_questions().

max_student_percent

Maximum student percent used by detect_stalled_students().

min_students

Minimum student count for difficult-question detection.

min_attempts

Minimum attempt count for difficult-question and stalled-student detection.

quiet

If TRUE, suppress rendering output from rmarkdown::render().

Value

The output path, invisibly.

Examples

if (FALSE) { # \dontrun{
db_path <- tempfile(fileext = ".sqlite")
con <- init_tracking_db(db_path, overwrite = TRUE)
register_questions(con, "module_01", c("q1", "q2"))
track_attempt(con, "student_001", "module_01", "q1", "mean(x)", score = 1, max_score = 1)
generate_teacher_report(con, tempfile(fileext = ".html"), "module_01")
DBI::dbDisconnect(con)
} # }