Change correct answer of exercise created with r-exams after openolat test was taken

115 Views Asked by At

If an exam is created with r-exams, exported to openolat with exams2openolat(exm, n = 50,...) and already been taken by multiple students, OLAT grades the students automatically. After the test one finds that in one or more exercises there was a mistake e.g.one has written\exsolution{000111} instead of \exsolution{000101}. How could this be fixed, and the students points automatically adapted without going through all (maybe 200) students manually?

Maybe by importing the marked solutions back into R? Or can this somehow be done in OLAT directly?

I found a solution (How to change the correct answer of a question and replicate exams from scratch when exshuffle is on (package 'exams')?) for scanned tests, but how can one do something similar in OLAT?

1

There are 1 best solutions below

3
Achim Zeileis On

To the best of my knowledge there is no functionality for this in OpenOlat (other than doing it manually for each individual result). But there is the option to export a zipped version of the test which includes a self-contained version of the individual HTML pages and a summary table in .xlsx format. The latter can be read into R and processed further.

The export can be found in Administration > Archive tool > Test (in German the Archive tool is called Datenarchivierung). When you unzip the resulting .zip file it contains a .xlsx file that is formatted somewhat inconveniently, especially if there are many random replications per exercise in the test. We have written some convenience functions for dealing with this that I have just put up in package exams2openolat on R-Forge. It can be installed with:

install.packages("exams2openolat", repos = "https://R-Forge.R-project.org")

If you have the exported file, say olattest.xlsx, in the current working directory, then you can read it into a data frame with:

res <- exams2openolat:::read_olat_results("olattest.xlsx")

If you additionally have an .rds file olattest.rds with the output from exams2openolat() you can even get some more convenient results via:

res <- exams2openolat::olat_eval("olattest")

You probably haven't stored such an .rds when you generated the OpenOlat test but maybe you have kept the R code including random seed. If so, you can re-run the code after library("exams2openolat") which then not only creates the .zip file but also the .rds file along with it.