Create object MultipleChoiceTable
Usage
multipleChoiceTable(
identifier = generate_id(),
title = identifier,
content = list(),
prompt = "",
points = 1,
rows,
rows_identifiers,
cols,
cols_identifiers,
answers_identifiers,
answers_scores = NA_real_,
shuffle = TRUE,
shuffle_rows = TRUE,
shuffle_cols = TRUE,
feedback = list(),
calculator = NA_character_,
files = NA_character_
)
Arguments
- identifier
A character representing the unique identifier of the assessment task. By default, it is generated as 'id_task_dddd', where dddd represents random digits.
- title
A character representing the title of the XML file associated with the task. By default, it takes the value of the identifier.
- content
A character string or a list of character strings to form the text of the question, which may include HTML tags.
- prompt
An optional character representing a simple question text, consisting of one paragraph. This can supplement or replace content in the task. Default is "".
- points
A numeric value, optional, representing the number of points for the entire task. It can also be calculated as the sum of points for individual answers, when provided. Default is 1.
- rows
A character vector specifying answer options defined in rows of the table.
- rows_identifiers
A character vector, optional, specifies identifiers of the rows of the table
- cols
A character vector specifying answer options defined in columns of the table.
- cols_identifiers
A character vector, optional, specifies identifiers of the columns of the table.
- answers_identifiers
A character vector specifying couples of identifiers that combine the correct answers.
- answers_scores
A numeric vector, optional, where each number determines the number of points awarded to a candidate if they select the corresponding answer. If not assigned, the individual values for correct answers are calculated from the task points and the number of correct options.
- shuffle
A boolean value, optional, determining whether to randomize the order in which the choices are initially presented to the candidate. Default is
TRUE.
- shuffle_rows
A boolean value, optional, determining whether to randomize the order of the choices only for the first elements of the answer tuples. Default is
TRUE.
- shuffle_cols
A boolean value, optional, determining whether to randomize the order of the choices only for the second elements of the answer tuples. Default is
TRUE.
- feedback
A list containing feedback message-object ModalFeedback for candidates.
- calculator
A character, optional, determining whether to show a calculator to the candidate. Possible values:
"simple"
"scientific".
- files
A character vector, optional, containing paths to files that will be accessible to the candidate during the test/exam.
Value
An object of class MultipleChoiceTable
Examples
mt_min <- multipleChoiceTable(content = "<p>\"Multiple choice table\" task</p>",
rows = c("alfa", "beta", "gamma", "alpha"),
rows_identifiers = c("a", "b", "g", "aa"),
cols = c("A", "B", "G", "a"),
cols_identifiers = c("as", "bs", "gs", "aas"),
answers_identifiers = c("a as", "b bs", "g gs", "aa as", "a aas", "aa aas"))
mt <- multipleChoiceTable(identifier = "id_task_1234",
title = "Table with many possible answers in rows and cols",
content = "<p>\"Multiple choice table\" task</p>",
prompt = "Plain text, can be used instead of the content",
rows = c("alfa", "beta", "gamma", "alpha"),
rows_identifiers = c("a", "b", "g", "aa"),
cols = c("A", "B", "G", "a"),
cols_identifiers = c("as", "bs", "gs", "aas"),
answers_identifiers = c("a as", "b bs", "g gs", "aa as", "a aas", "aa aas"),
answers_scores = c(1, 0.5, 0.1, 1, 0.5, 1),
shuffle_rows = FALSE,
shuffle_cols = TRUE)
#> Total points for the task have been recalculated as the sum of individual answers.