exams2particify: Generation of Exam/Quiz Sessions in Particify Format

View source: R/exams2particify.R

exams2particifyR Documentation

Generation of Exam/Quiz Sessions in Particify Format

Description

Interface for generating comma-separated files for import in the audience response system Particify.

Usage

exams2particify(file, n = 1L, dir = ".", name = "particify",
  quiet = TRUE, resolution = 100, width = 4, height = 4, svg = FALSE,
  abstention = FALSE, fix_choice = TRUE, ...)

Arguments

file

character. A specification of a (list of) exercise files.

n

integer. The number of copies to be compiled from file.

dir

character. The default is either display on the screen or the current working directory.

name

character. A name prefix for resulting exercises and RDS file.

quiet

logical. Should output be suppressed when calling xweave and texi2dvi.

resolution, width, height

numeric, passed to xweave.

svg

logical. Should graphics be rendered in SVG or PNG (default)?

abstention

logical. Are abstentions allowed for choice questions?

fix_choice

logical. Should math markup be removed in single and multiple choice lists? (This may be needed for older Particify versions where math markup is rendered in the question itself but not the choice list.)

...

arguments passed on to xexams.

Details

exams2particify generates exams in comma-separated values (CSV) format that can be imported into the audience response system Particify (https://particify.de/) using xexams. In particular, single-choice and multiple-choice exercises are fully supported while num and string question are converted to open-ended text questions.

The function proceeds by (1) calling xweave on each exercise, (2) reading the resulting Markdown/LaTeX text, (3) transforming the text to Markdown, and (4) embedding the Markdown text into the CSV format for Particify. For steps (1) and (2) the standard drivers in xexams are used. For step (3) a suitable transformation function is set up on the fly using make_exercise_transform_pandoc. For step (4) a custom writer function is set up on the fly.

Value

A list of exams as generated by xexams is returned invisibly.

Examples

## load package and enforce par(ask = FALSE)
library("exams")
options(device.ask.default = FALSE)

## output directory
dir.create(mydir <- tempfile())

## create a CSV file particify-1.csv for import in Particify
exams2particify(c("swisscapital.Rmd", "capitals.Rmd", "deriv2.Rmd",
  "boxplots.Rmd", "ttest.Rmd", "function.Rmd"), dir = mydir)

exams documentation built on Nov. 14, 2022, 3:02 p.m.