Skip to contents

Take a tutorial session, extract out all the submitted answers, and write out an html file with all of those answers.

Usage

write_answers(file, session, is_test = FALSE)

Arguments

file

Location to render answers to. Output file type determined by file suffix. Only "html" is acceptable.

session

Session object from Shiny with learnr.

is_test

TRUE/FALSE depending on whether or not we are just testing the function. Default is TRUE.

Details

We only keep track of the questions/exercises that the student has completed. The other obvious approach is to keep all the questions/exercises and leave unanswered ones as NA. Not sure if that approach is better, or even possible.

Examples

if(interactive()){
  write_answers("getting-started_answers.html", sess)
}