quiz_items.mdl_quiz_data: Extract item-level and distractor data

Description Usage Arguments Details

Description

Extract a matrix or data.frame of question marks

Usage

1
2
3
## S3 method for class 'mdl_quiz_data'
quiz_items(x, marks = "categorical",
  question.type = NULL, fill = NA, mat = TRUE)

Arguments

x

An object of class "mdl_quiz_data"

marks

Char, defaults to "categorical"

question.type

List of distractors for to get key for; if NULL (the default) all keys will be extracted

fill

What to use to fill missing values, defaults to NA

mat

If TRUE (default), the result will be a matrix otherwise a data.frame

Details

Extract item marks either as binary (correct/incorrect) or categorical data (for multiplechoice questions). If the test contains a mixture of binary and categorical items (such as truefalse and multichoice), than marks = "binary" will collapse multiple choice items into correct/incorrect (1/0). When using marks = "categorical", mutliplechoice options will be preserved but a key needs to be obtained (see quiz_key for details). Weighted percentages can also be extracted by marks = "weighted" - in this case, each item's contribution will be weighted by its nominal weight, set in the quiz edit page in Moodle. Finally, you can obtain nominal weights as they appear on the edit quiz page, using marks = "nominal".


jchrom/moodler documentation built on May 18, 2019, 10:23 p.m.