question_methods: Custom question methods.

Description Usage Arguments See Also

Description

There are five methods used to define a custom question. Each S3 method should correspond to the type = TYPE supplied to the question.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
question_ui_initialize(question, value, ...)

question_ui_try_again(question, value, ...)

question_ui_completed(question, value, ...)

question_is_valid(question, value, ...)

question_is_correct(question, value, ...)

## Default S3 method:
question_ui_initialize(question, value, ...)

## Default S3 method:
question_ui_try_again(question, value, ...)

## Default S3 method:
question_ui_completed(question, value, ...)

## Default S3 method:
question_is_valid(question, value, ...)

## Default S3 method:
question_is_correct(question, value, ...)

Arguments

question

question object used

value

user input value

...

future parameter expansion and custom arguments to be used in dispatched s3 methods.

See Also

For more information and question type extension examples, please view the question_type tutorial: learnr::run_tutorial("question_type", "learnr").


learnr documentation built on March 26, 2020, 7:45 p.m.