I have created a XML file using R-exams out of just a single exercise to be imported to Moodle. I would like to view it before uploading it in the Moodle question bank. I tried to open it with Firefox and I can see some code but not the output and a message appear saying that the XML file does not seem to have a style sheet associated to it. Is there a way to find this style sheet and to see how the question comes out just using a browser like Firefox or Chrome?
Asked
Active
Viewed 289 times
2
-
`exams2html` or `exams2pdf` would be enough? – uzsolt Jun 26 '20 at 12:42
-
Currently, I use `exams2pdf` to have a preview, but `exams2pdf` does not always behave exactly as `exams2moodle`. So I wonder whether it is possible to use a browser or another program to open the XML file and view the output or the only way is uploading it to the Moodle question bank. – user12703198 Jun 26 '20 at 13:27
1 Answers
0
To emulate how the R/exams exercises are converted to HTML by exams2moodle()
and how Moodle displays mathematical content, it's best to use
exams2html(..., converter = "pandoc-mathjax")
In recent versions of R/exams the resulting HTML file then automatically loads the MathJax Javascript that enables correct rendering of mathematical content in all modern browsers (including Google Chrome). See also http://www.R-exams.org/tutorials/math/ for some general advice about math in HTML.
To the best of my knowledge there is no tool that would quickly display Moodle XML files in such a way that you can easily assess them.

Achim Zeileis
- 15,710
- 1
- 39
- 49
-
Thank you! I have a question. I usually write `exams2moodle(ex, n=1, dir="moodle", edir="../esercizi", converter = "pandoc-mathjax", cloze=list(cloze_mchoice_display="MULTICHOICE_V"), stitle=ex, schoice =list(eval = list(partial = TRUE, rule = "none")), name=ex)` but if I try to replace `exams2moodle` with `exams2html` I get an error message. What would be the correct syntax for using `exams2html` instead of `exams2moodle` but with the same (or similar) options? – user12703198 Jun 27 '20 at 09:43
-
`exams2html()` does not provide any automatic evaluation. Hence it does not support many of the arguments from `exams2moodle()` such as `cloze`, `schoice`, and `stitle`. See `?exams2html` for more details. – Achim Zeileis Jun 27 '20 at 12:32
-
Ok. I understand that `exams2html` does not provide automatic evaluation. But the option `cloze_mchoice_display="MULTICHOICE_V` is not about the evaluation. Isn't there an equivalent for `exams2html`? – user12703198 Jun 27 '20 at 16:21
-