Provides an alternative interface to working with the exams package for producing Moodle questions any type.
Usage
moodlequiz(
replicates = 1L,
self_contained = TRUE,
extra_dependencies = NULL,
theme = NULL,
includes = NULL,
lib_dir = NULL,
md_extensions = NULL,
pandoc_args = NULL,
...
)
Arguments
- replicates
The number of times the questions are rendered, useful for producing multiple versions of the same quiz with different random samples. To keep identify replicates of questions for random importation into Moodle we recommend organising the materials into categories using top level headers.
- self_contained
Produce a standalone HTML file with no external dependencies, using data: URIs to incorporate the contents of linked scripts, stylesheets, images, and videos. Note that even for self contained documents MathJax is still loaded externally (this is necessary because of its size).
- extra_dependencies
Extra dependencies as a list of the
html_dependency
class objects typically generated byhtmltools:htmlDependency()
.- theme
One of the following:
A
bslib::bs_theme()
object (or a list ofbslib::bs_theme()
argument values)Use this option for custom themes using Bootstrap 4 or 3.
In this case, any
.scss
/.sass
files provided to thecss
parameter may utilize thetheme
's underlying Sass utilities (e.g., variables, mixins, etc).
NULL
for no theme (i.e., nohtml_dependency_bootstrap()
).A character string specifying a Bootswatch 3 theme name (for backwards-compatibility).
- includes
Named list of additional content to include within the document (typically created using the
includes
function).- lib_dir
Directory to copy dependent HTML libraries (e.g. jquery, bootstrap, etc.) into. By default this will be the name of the document with
_files
appended to it.- md_extensions
Markdown extensions to be added or removed from the default definition of R Markdown. See the
rmarkdown_format
for additional details.- pandoc_args
Additional command line options to pass to pandoc
- ...
Additional function arguments to pass to the base R Markdown HTML output formatter
html_document_base