score_mcq: Score multiple-choice question

View source: R/utils.R

score_mcqR Documentation

Score multiple-choice question

Description

Score a multiple-choice question.

Usage

score_mcq(
  subvar,
  sol_env,
  opts_all,
  solvar = subvar,
  rectify = TRUE,
  add = TRUE
)

Arguments

subvar

Name of the submission variable

sol_env

Solution environment

opts_all

Vector whose elements comprise the full set of options (e.g., "a", "b", "c", "d")

solvar

Name of the solution variable

rectify

Whether to attempt to correct the format of the submitted answer

add

whether to add feedback

Value

vector of logicals, one for each option, plus "type" and "fmt_ok" to indicate correctly formatted answer


dalejbarr/assessr documentation built on Jan. 25, 2024, 10:47 p.m.