exams2nops {c403}R Documentation

Exams Interfaces

Description

Interfaces for generating exams at Uni Innsbruck.

Usage

  exams2nops(file, n = 1L, dir = NULL, name = NULL,
    language = "de", title = "Klausur", course = "",
    institution = "Universit\\\"at Innsbruck", logo = "uibk-logo-bw.png",
    date = Sys.Date(), replacement = TRUE, intro = NULL, blank = NULL,
    duplex = TRUE, pages = NULL, usepackage = NULL, encoding = "", startid = 1L,
    points = NULL, showpoints = FALSE, reglength = 8L, ...)

  exams2olat(file, n = 1L, dir = ".", name = "olattest", maxattempts = 1,
    cutvalue = 1000, solutionswitch = FALSE, 
    stitle = "Aufgabe", ititle = "Frage",
    adescription = "Bitte bearbeiten Sie folgende Aufgaben.",
    sdescription = "Bitte beantworten Sie folgende Frage.",
    eval = list(partial = FALSE, negative = FALSE),    
    ...)

  exams2openolat(file, n = 1L, dir = ".", name = "olattest", maxattempts = 1,
    cutvalue = 1000, solutionswitch = FALSE, qti = "1.2",
    stitle = "Aufgabe", ititle = "Frage",
    adescription = "Bitte bearbeiten Sie folgende Aufgaben.",
    sdescription = "Bitte beantworten Sie folgende Frage.",
    eval = list(partial = FALSE, negative = FALSE),    
    ...)

  exams2quiz(file, n = 1L, dir = ".", name = "VU", solution = FALSE,
    quiet = TRUE, encoding = "", ...)

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.

language

character. Path to a DCF file with a language specification. Currently, "en" and "de" are shipped with the exams package.

title

character. Title of the exam, e.g., "Statistische Datenanalyse".

course

character. Course number, e.g., "403001".

institution

character. Name of the institution at which the exam is conducted.

logo

character. Path to a logo image. If the logo is not found, it is simply omitted.

date

character or "Date" object specifying the date of the exam.

replacement

logical. Should a replacement exam sheet be included?

intro

character with LaTeX code for introduction text at the beginning of the exam.

blank

integer. Number of blank pages to be added at the end. (Default is chosen to be half of the number of exercises.)

duplex

logical. Should blank pages be added after the title page (for duplex printing)?

pages

character. Path(s) to additional PDF pages to be included at the end of the exam.

usepackage

character. Names of additional LaTeX packages to be included.

encoding

character, passed to Sweave.

startid

integer. Starting ID for the exam numbers (defaults to 1).

points

integer. How many points should be assigned to each exercise? Note that this argument overules any exercise points that are provided within the expoints tags of the exercise files (if any). The vector of points supplied should either have length 1 or the number of exercises in the exam.

showpoints

logical. Should the PDF show the number of points associated with each exercise (if specified in the Rnw/Rmd exercise or in points)?

reglength

integer. Number of digits in the registration ID. The default is 8 and it can be increased up to 10.

maxattempts

integer. The maximum attempts for one question, may also be set to Inf.

cutvalue

numeric. The cutvalue at which the exam is passed.

solutionswitch

logical. Should the question/item solutionswitch be enabled?

qti

character indicating whether QTI "1.2" (default) or "2.1" should be generated.

stitle, ititle, adescription, sdescription, eval

character. Descriptions for various titles/descriptions. Defaults to generic German titles.

...

arguments passed on to exams2pdf and exams2qti12, respectively.

solution

logical. Should the full solution be included?

quiet

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

Details

exams2nops is a convenience interface for exams2nops with UIBK-specific defaults.

exams2olat is a convenience interface for exams2qti12 with some tweaks for OLAT and German titles/descriptions.

exams2openolat is a convenience interface for exams2openolat with German titles/descriptions.

All three produce an RDS file as a by-product containing the xexams list.

exams2quiz provides fallback support for quizzes in lecture sessions.

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)

## define an exams (= list of exercises)
myexam <- list(
  "boxplots",
  c("tstat", "ttest", "confint"),
  c("regression", "anova"),
  c("scatterplot", "boxhist"),
  "relfreq"
)

## output directory
mydir <- tempdir()

## generate .zip with German OLAT exam in temporary directory
## using a few customization options
exams2olat(myexam, n = 3, dir = mydir,
  maxattempts = 3,
  num = list(digits = 1),
  mchoice = list(shuffle = TRUE, enumerate = FALSE)
)
dir(mydir)

if(interactive()) {
## compile a single random exam (displayed on screen)
exams2nops(c("tstat2", "anova", "boxplots"))

## compile a single random quiz (displayed on screen)
exams2quiz(rep("tstat2", 2))
}

[Package c403 version 0.8-1 Index]