Exam Output Format

exam_document(
  id = "exam",
  version = "0.1",
  use_cdn = FALSE,
  render = c("server", "static"),
  progressive = FALSE,
  order = c("random", "fixed"),
  max_attempts = Inf,
  timelimit = Inf,
  opens = NA,
  closes = NA,
  feedback = NA,
  grace_period = 120,
  self_contained = TRUE,
  fig_width = 7,
  fig_height = 5,
  fig_retina = 2,
  fig_caption = TRUE,
  keep_md = FALSE,
  dev = "png",
  highlight = "tango",
  df_print = "default",
  css = NULL,
  mathjax = "default",
  md_extensions = NULL,
  extra_dependencies = NULL,
  ...
)

Arguments

id

the exam id string. To ensure compatibility with most storage providers, should be a short yet unique identifier with only alphanumeric characters and -_..

version

the exam version string. Must only contain numbers and the . character, e.g., 1, 0.5, 2.3.4, etc.

use_cdn

load javascript libraries from external content delivery networks (CDNs). Use this if the shiny server is slow at serving static resources, but beware of the downsides of relying on content from a third-party! Note that the default MathJax library is always loaded from a CDN.

render

render section content on the server ("server") or statically when rendering the document ("static"). If rendered on the server, the section content will only be sent to the user's browser when the section is displayed. This ensures users do not see the section content before they are supposed to.

progressive

are sections displayed one after another or all at once? If all sections are displayed at once, only the last section button is shown.

order

if progressive=TRUE, the order in which sections will be shown. Can be either random, in which case the order is randomized using the seed from the attempt, or fixed, in which case the order in the exam document is kept.

max_attempts

maximum number of attempts allowed. This can be overridden for individual users by configure_attempts(). Can also be Inf to allow for unlimited number of attempts (the default).

timelimit

the time limit for a single attempt either as a single number in minutes or as HH:MM. This can be overridden for individual users with configure_attempts(). Can also be Inf to give users unlimited time (the default).

opens, closes

the opening and closing time for the exam, in the format YYYY-MM-DD HH:MM Timezone (e.g., 2020-10-15 19:15 Europe/Vienna for October 15th, 2020 at 19:15 in Vienna, Austria). The exam is only accessible within this time frame. This can be overridden for individual users with configure_attempts(). Can also be NA to either make the exam available immediately, indefinitely, or both (the default).

feedback

the date/time on which the solution and feedback are available, "immediately" for showing feedback immediately after the exam is submitted, or NA, in which case no feedback view is available. Note that if feedback is shown immediately after the exam is submitted, the last section is treated as a regular section.

grace_period

number of seconds of "grace" period given to users before an active attempt is disabled. This can be overridden for individual users with configure_attempts().

self_contained

produce a HTML file with all external dependencies included using data: URIs. Note that the default MathJax library is always loaded from an external CDN (see use_cdn for details).

fig_width

default width (in inches) for figures.

fig_height

default height (in inches) for figures.

fig_retina

scaling to perform for retina displays. Set to NULL to prevent retina scaling. See rmarkdown::html_document() for details.

fig_caption

TRUE to render figures with captions.

keep_md

Keep the markdown file generated by knitting.

dev

graphics device to use for figure output (defaults to png).

highlight

Enable syntax highlighting style via pandoc. Supported styles include "tango", "pygments", "kate", "monochrome", "espresso", "zenburn", "haddock". Pass NULL to prevent syntax highlighting.

df_print

method to be used for printing data frames. Valid values include "default", "kable", "tibble", and "paged". See rmarkdown::html_document() for details.

css

one or more CSS files to include in the document.

mathjax

if and how to include MathJax. The "default" option uses MathJax v3 from a CDN. You can pass an alternate URL or pass NULL to disable MathJax entirely.

md_extensions

markdown extensions to be added or removed from the default definition of R Markdown. See rmarkdown::rmarkdown_format() for details.

extra_dependencies, ...

additional arguments passed on to the base R Markdown HTML output rmarkdown::html_document_base().