olat_exercise: Extract (and Display) Exercises from OLAT Exams

Description Usage Arguments Details Value See Also


Extract (and display) selected exercises from OLAT exams produced with exams2olat in order to see both question and solution.


  olat_exercise(x, ..., fixed = TRUE, show = TRUE, mathjax = TRUE)



character or list. Either an OLAT exam list as produced by exams2olat or a character with the file path to an .rds file containing such an exam.


character. Either a single numeric index of the exam to be selected. Or, alternatively, patterns to be searched for in the question text of the exams in x.


logical. Should the search pattern(s) be matched as is?


logical. Should the exercise(s) found be shown in the browser?


logical. Should the JavaScript from http://www.MathJax.org/ be included for rendering mathematical formulas?


olat_exercise is a companion function for exams2olat. As OLAT has no option to look at the precise question of a particular student – and more importantly the corresponding solution – one strategy is to search for particular words, numbers, or other strings in the database of all questions from an OLAT exam.

olat_exercise goes through all questions in the exam and selects those question(s) that match(es) the given search patterns. By default the question(s)/solution(s) are displayed in the browser and returned invisibly.


A list containing either a single exercise or a list of such exercises (in case the search patterns do not yield a unique question).

See Also


c403 documentation built on May 13, 2019, 3:04 p.m.