View source: R/question_category.R
question_category | R Documentation |
question_category
S3 classCreates a question_category
object.
question_category(
category = "Default category",
first_question_number = 1,
copyright = "",
license = "",
correct_feedback = "Correct.",
partially_correct_feedback = "Partially correct.",
incorrect_feedback = "Incorrect.",
adapt_images = FALSE,
width = 800,
height = 600,
author = "",
fraction = 0
)
category |
A string, category name. |
first_question_number |
An integer, first number to compose the question names. |
copyright |
A string, copyright text to be included in each question that is defined. |
license |
A string, license text to be included in each question that is defined. |
correct_feedback |
A string, feedback on correct answers to each question. |
partially_correct_feedback |
A string, feedback on partially correct answers to each question. |
incorrect_feedback |
A string, feedback on incorrect answers to each question. |
adapt_images |
A boolean, adapt the images so that they are a similar size. |
width |
A integer, width of each image. |
height |
A integer, height of each image. |
author |
A string, author name to be included in each question that is defined. |
fraction |
A number between 0 and 1. |
Defines a category of questions to be included in the Moodle question bank.
It allows us to define the name of the category, the copyright and license literals that will be added to each question, and the feedback literals for correct, partially correct and incorrect questions.
Each question can include an image after the text. We can also configure if we want to automatically transform the images so that they have a standard size that we can also indicate.
The fraction
attribute is used in various question types to determine how a
specific answer impacts the question's score. Specifically, for incorrect answers
in the multichoice
and truefalse
types, the value calculated by dividing
fraction
by the number of incorrect answers available is considered as the
amount deducted in case of an incorrect response.
A question_category
object.
Other question definition functions:
define_extended_question()
,
define_question()
,
define_questions_from_csv()
,
define_questions_from_data_frame()
,
define_questions_from_excel()
,
generate_xml()
,
generate_xml_file()
qc <- question_category(category = 'Initial test')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.