qti_manifest: The qti_manifest class

View source: R/qti_manifest.R

qti_manifestR Documentation

The qti_manifest class

Description

These functions build and manipulate qti_manifest objects, for analysis and for reading and writing to QTI XML.

Usage

qti_manifest(x, id = NULL, title = NULL, xml = NULL)

Arguments

x

One or more items as “qti_item” objects.

id

Optional identifier.

title

Assessment title, as a string, with max 140 characters.

xml

Optional XML representation of manifest, as character. If not supplied, this is created automatically from the remaining arguments.

Value

qti_manifest returns an object of class “qti_manifest”, which is a list containing named elements for the assessment id and title, as supplied via arguments, the items in x as a list of “qti_item”, and the QTI XML representation of the manifest.

Examples


item <- qti_item(
  id = "item-1",
  title = "Example Item",
  type = "choice",
  prompt = "What does this image tell you? <img src='life.png' />",
  options = c("Everything", "Something",
    "Nothing, but look at this code:<br/><pre>lm(life ~ R)</pre>"),
  key = c(1, 1, 0)
)
man <- qti_manifest(
  x = item,
  id = "exam-1",
  title = "Example Exam"
)


talbano/qti documentation built on Jan. 25, 2023, 4:02 a.m.