View source: R/format_questions.R
generate_question_body | R Documentation |
Creates the body of the question based on its type and additional parameters such as feedback and orientation.
generate_question_body(
type,
answer,
a_values,
fb_correct,
fb_incorrect,
fb_partially,
orientation,
fb_answer,
fb_a_values,
image,
image_alt,
fraction
)
type |
A string, the question type. |
answer |
A string or vector, the correct answer(s) for the question. |
a_values |
A vector, additional answers for the question. |
fb_correct |
A string, feedback for correct answers. |
fb_incorrect |
A string, feedback for incorrect answers. |
fb_partially |
A string, feedback for partially correct answers. |
orientation |
A string, 'v' or 'h'. |
fb_answer |
A string, answer feedback. |
fb_a_values |
A vector, rest of answer feedback. |
image |
Path to an image file associated with the question. |
image_alt |
Alternative text describing the image for accessibility. |
fraction |
A number between 0 and 1. |
A string containing the question body in XML format.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.