| html_e2m | R Documentation |
Creates an HTML page with all the contents of 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 code.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 fact that for the XML tag
<questionlist>...</questionlist>) "<br>" is used instead of "\n".
html_e2m(
exam,
name = NULL,
pattern = ".",
mathjax = TRUE,
browseURL = TRUE,
overwrite = FALSE,
header = 2,
merge = list(questionlist = "<br>"),
png = TRUE
)
exam |
list: return list from |
name |
character: name of HTML file (default: |
pattern |
character: string containing a regular expression to match list elements (default: |
mathjax |
logical: should MathJax be loaded (default: |
browseURL |
logical: should the generated HTML shown (default: |
overwrite |
logical: should the HTML file 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 |
invisibly the names of list elements in the HTML file
The aim is similar to exams:::exams:::browse_exercise, but html_e2m takes the information form
the XML file generated by the exams2moodle.
if (interactive()) {
resexams <- readRDS(system.file("xml", "klausur-test.rds", package="exams.moodle"))
html_e2m(resexams) # opens HTML file into browser
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.