I exported the quiz generated by sample code of exams2canvas:
library("exams")
options(device.ask.default = FALSE)
set.seed(0)
## define an exams (= list of exercises)
myexam <- c(
"boxplots",
"tstat",
"ttest",
"regression",
"relfreq"
)
## output directory
dir.create(mydir <- tempfile())
## generate .zip with OpenOLAT test in temporary directory
exams2canvas(myexam, n = 3, dir = mydir)
dir(mydir)
I was able to import the zip file into Canvas as a quiz. However, when I check the quiz, the comment for each answer appears to be missing. I checked the xml file generated by exams2canvas()
and the file does contain solutions and explanations for each question in the <solutionmaterial>
block. For some reason they are not imported to Canvas.
Any pointers to help fix this issue will be very much appreciated!
Edit: Included screenshot of empty comments.
It turns out the issue was because I was using an older version of r-exams (exams_2.3-6). Once I updated the package to the development version (currently exams_2.4-0) using
install.packages("exams", repos="https://R-Forge.R-project.org")
as suggested by @AchimZeileis in this thread, then the question-level feedback displays correctly in Canvas.
Big shout-out to Achim and the entire r-exams team for developing a tremendously useful package and for the helpful and detailed responses.