| html_e2m {exams.forge} | R Documentation |
HTML exams.forge
Description
Creates an HTML page with all the contents of the XML tags whose names match pattern.
The default is to show the contents of all XML tags. The HTML page is stored in the HTML file name.
The default name=NULL creates a temporary file. If the name does not end in .html, then a .html is appended.
If browseURL=TRUE (default) then the HTML page will be displayed in the browser.
If necessary the contents of XML tags are concatenated with "\n".
For single XML tags this can be changed, e.g. merge=list("questionlist"="<br>" leads to the XML tag
<questionlist>...</questionlist>) "<br>" being used ,instead of the "\n".
Usage
html_e2m(
exam,
name = NULL,
pattern = ".",
mathjax = TRUE,
browseURL = TRUE,
overwrite = FALSE,
header = 2,
merge = list(questionlist = "<br>"),
png = TRUE
)
toHTML_XML(
exam,
name = NULL,
pattern = ".",
mathjax = TRUE,
browseURL = TRUE,
overwrite = FALSE,
header = 2,
merge = list(questionlist = "<br>"),
png = TRUE
)
Arguments
exam |
list: returns a list from |
name |
character: name of the HTML file (default: |
pattern |
character: string containing a regular expression to match the list elements (default: |
mathjax |
logical: should MathJax be loaded? (default: |
browseURL |
logical: should the generated HTML be shown? (default: |
overwrite |
logical: should the HTML file be overwritten (if it exists)? (default: |
header |
integer: at which level of the list a |
merge |
list: should elements with |
png |
logical: if a entry ends with |
Value
Invisibly, the names of listed elements in the HTML file.
See Also
The aim is similar to exams:::exams:::browse_exercise, however, html_e2m takes the information form
the XML file generated by the exams.forge package.
Examples
if (interactive()) {
resexams <- readRDS(system.file("xml", "klausur-test.rds", package="exams.moodle"))
html_e2m(resexams) # opens HTML file into browser
}