olat_exercise: Extract (and Display) Exercises from OpenOlat Exams

View source: R/olat_exercise.R

olat_exerciseR Documentation

Extract (and Display) Exercises from OpenOlat Exams

Description

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

Usage

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

Arguments

x

character or list. Either an OpenOlat exam list as produced by exams2openolat 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.

fixed

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

show

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

mathjax

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

Details

olat_exercise is a companion function for exams2openolat. As OpenOlat has no option during an exam 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 OpenOlat 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.

Value

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

exams2openolat


c403 documentation built on Oct. 20, 2023, 3:01 p.m.