Convert Leanpub md quiz to Coursera yaml quiz

convert_coursera_quizzes(
  input_quiz_dir = "quizzes",
  output_quiz_dir = "coursera_quizzes",
  verbose = TRUE
)

Arguments

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?

Value

A folder of coursera ready quiz files saved to the output directory specified as a yamls.

Examples


# 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()))
)
#> [1] TRUE

# Provide path to directory of quizzes
convert_coursera_quizzes(tdir)
#> Converting quiz: /var/folders/2d/d8927cd105550jjcy7qy99_w0000gn/T//Rtmpul8PsZ/file40967c9f558/quiz_good.md
#> Converted quiz saved to: coursera_quizzes/quiz_good.md.yml
#> [[1]]
#> NULL
#> 

system("rm -r coursera_quizzes")