Skip to contents

Class TextGapOpal is responsible for creating instances of input fields with text type of answers in question Entry type assessment tasks according to the QTI 2.1 standard for LMS Opal.

Slots

response_identifier

A character value representing an identifier for the answer. By default, it is generated as 'id_gap_dddd', where dddd represents random digits.

points

A numeric value, optional, representing the number of points for this gap. Default is 1.

incorrect

Score for an incorrect nonempty response, in points. Default 0. Numeric/text gaps allow a finite non-positive score; omitted or whitespace-only text responses receive zero.

placeholder

A character value, optional, used to place helpful text in the text input field in the content delivery engine.

expected_length

A numeric value, optional, used to set the size of the text input field in the content delivery engine.

solution

A character vector containing the values considered as correct answers.

solution_variable

An optional QTI identifier of a string template variable used as the correct answer instead of solution. Dynamic text answers require zero spelling tolerance.

case_sensitive

A boolean value, determining whether the evaluation of the correct answer is case sensitive. Default is FALSE.

tolerance

A numeric value defining how many characters will be taken into account to tolerate spelling mistakes in the evaluation of candidate answers. Default is 0.

Examples

tgo <- new("TextGapOpal",
          response_identifier = "id_gap_1234",
          points = 2,
          placeholder = "do not put special characters",
          expected_length = 20,
          solution = "answer",
          case_sensitive = FALSE,
          tolerance = 1)