View source: R/quiz_formatting.R
| convert_coursera_quizzes | R Documentation | 
Convert Leanpub md quiz to Coursera yaml quiz
convert_coursera_quizzes(
  input_quiz_dir = "quizzes",
  output_quiz_dir = "coursera_quizzes",
  verbose = TRUE
)
| input_quiz_dir | A path to a directory of leanpub formatted quiz md files. By default assumes "quizzes" and looks in current directory. | 
| output_quiz_dir | A folder (existing or not) that the new coursera converted quizzes should be saved to. By default saves to "coursera_quizzes". | 
| verbose | Would you like the progress messages: TRUE/FALSE? | 
A folder of coursera ready quiz files saved to the output directory specified as a yamls.
# Set up a directory with a quiz in it for this example
tdir <- tempfile()
dir.create(tdir, showWarnings = FALSE, recursive = TRUE)
file.copy(
  from = good_quiz_path(),
  to = file.path(tdir, basename(good_quiz_path()))
)
# Provide path to directory of quizzes
convert_coursera_quizzes(tdir)
system("rm -r coursera_quizzes")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.