Generate Questions for MyLearn

Darjus Hosszejni, WU Vienna

R CMD check


Randomized multiple-select and single-select question generation for the MyLearn teaching platform used by universities. Question templates in the form of the R/exams package are transformed into MyLearn’s XML format. Note that the feedback has to stay simple, see the Issues section. The imported questions can be organized into exams in the Learning Activities.


The question import functionality might have to be turned on by your MyLearn support team.




One creates an R/exams compatible exercise file similar to example_question.Rmd, decides for a name prefix and for the number of generated exams.

n <- 10L  # number of variants of the exercise
name <- "learn_exercise"  # prefix of the generated file names
exercise_file <- example_paths()["R_table"]
output <- exams2mylearn(filename = exercise_file,
                        n = n, dir = ".",
                        outfile = "")

The output .zip filepath is saved in output. One can upload that .zip file to Learn directly (after the Learn development team has activated that feature for the given course).


  1. MyLearn handles only single select and multiple select questions.
  2. “Answerlist” in the Solution block doesn’t work on MyLearn.


Should you find bugs or request features, please use the Issue tracker on Github.