exams2tcexam: Generation of Exams in TCExam Format

Description Usage Arguments Details Value References Examples

View source: R/exams2tcexam.R

Description

Interface for generating exams in TCExam format.

Usage

1
2
3
4
5
6
  exams2tcexam(file, n = 1L, nsamp = NULL, dir = ".",
    name = NULL, quiet = TRUE, edir = NULL, tdir = NULL, sdir = NULL, verbose = FALSE,
    resolution = 100, width = 4, height = 4, svg = FALSE, encoding = "", points = NULL,
    modulename = name, subjectname = name, subjectdescription = NULL, timer = 0,
    fullscreen = FALSE, inlineanswers = FALSE, autonext = FALSE, shuffle = FALSE,
    lang = "en", date = Sys.time(), zip = FALSE, converter = NULL, ...)

Arguments

file

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

n

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

nsamp, quiet, edir, tdir, sdir, verbose

arguments passed to xexams.

dir

character specifying the output directory path. The default is the current working directory.

name

character. A name prefix for resulting XML file.

resolution, width, height, svg, encoding

arguments passed to xweave.

points

numeric. Number of points for the questions.

modulename

character. Module name.

subjectname

character. Subject name.

subjectdescription

character. Subject description.

timer

numeric. Number of seconds for each question.

fullscreen

logical. Should the question be shown in full-screen mode?

inlineanswers

logical. Should the question list be presented inline?

autonext

logical. Automatically advance to the next item?

shuffle

logical. Should the question list of schoice/mchoice answers be shuffled (or kept fixed)?

lang

character. Two-letter indicator of the language.

date

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

zip

logical. Should the resulting XML file be zipped?

converter, ...

arguments passed on to make_exercise_transform_html. The default for converter is set to "ttm" unless there are Rmd exercises in file where "pandoc" is used.

Details

exams2tcexam generates XML exams that can be imported into the TCExam software of Asuni (2012). Currently, the subset of HTML(-like) commands that is supported in TCExam is rather limited, e.g., tables and figures cannot be directly included.

Value

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

References

Asuni (2012). TCExam: Computer-Based Assessment Software. http://tcexam.org/.

Examples

1
2
3
4
5
6
7
8
9
## load package and enforce par(ask = FALSE)
library("exams")
options(device.ask.default = FALSE)

## Not run: 
## exams2tcexam creates a single XML file
exams2tcexam("tstat2", n = 2)

## End(Not run)

Example output

Loading required namespace: tth
Loading required namespace: base64enc
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
Warning messages:
1: running command '< '/work/tmp/tmp/RtmpbPVVFR/file8a1cc14dca' '/usr/lib/R/site-library/tth/libs//ttm' -e2 -L -r -y2 2>/dev/null' had status 2 
2: running command '< '/work/tmp/tmp/RtmpbPVVFR/file8a11d2d2ced' '/usr/lib/R/site-library/tth/libs//ttm' -e2 -L -r -y2 2>/dev/null' had status 2 

exams documentation built on Sept. 23, 2017, 9:02 a.m.