# olat_exercise: Extract (and Display) Exercises from OLAT Exams In c403: Exam Tools for Department of Statistics (c403), Uni Innsbruck

## Description

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

## Usage

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

## Arguments

 x 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. 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 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.

## 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).

exams2olat