sc1 <- new("SingleChoice", prompt = "Example task 1", title = "SC1",
identifier = "q1", choices = c("a", "b", "c"))
sc2 <- new("SingleChoice", prompt = "Example task 2", title = "SC2",
identifier = "q2", choices = c("A", "B", "C"))
sc3 <- new("SingleChoice", prompt = "Example task 3", title = "SC3",
identifier = "q3", choices = c("aa", "bb", "cc"))
exam_section <- new("AssessmentSection",
identifier = "sec_id",
title = "Section",
time_limit = 20,
visible = FALSE,
assessment_item = list(sc1, sc2, sc3),
shuffle = FALSE,
selection = 1,
max_attempts = 1,
allow_comment = FALSE)
Run the code above in your browser using DataLab