ask: Ask a quiz question

Description Usage Arguments Details Value Examples

View source: R/ask.R

Description

Creates an object of class iRc_item.

Usage

1
ask(question, answer)

Arguments

question

Named character string to be used as the question. See details for valid names.

answer

Character string to be used as the answer. See details for valid names.

Details

Both parameters must be named character strings (or vectors). Currently these names are supported:

text:

The value will be pasted as-is to the HTML document.

img:

The value wil be treated as the relative path to an image.

html:

The value must be a XiMpLe.node object.

Value

An object of class iRc_item.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
q1 <- ask(
  question=list(text="What is Crichton's nick name for Chiana?"),
  answer=list(html=strong("Pip"))
)
q2 <- ask(
  question=list(text="What is Crichton's nick name for his gun?"),
  answer=list(html=strong("Winona"))
)
q3 <- ask(
  question=list(text="What is a famous quote from Rygel?"),
  answer=list(html=strong("Hail, prince of the obvious!"))
)
q4 <- ask(
  question=list(text="What is the Nebari Resistance fighting against?"),
  answer=list(html=strong("The Establishment"))
)

unDocUMeantIt/iRcotofun documentation built on May 3, 2019, 2:24 p.m.