You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears to be technically possible to import js/css/etc. into a Moodle quiz question.
To accomplish this,
$for(header-includes)$
$header-includes$
$endfor$
will need to be added to the template (bringing in the external dependencies). Then (probably with pandoc lua filters) these dependencies need to be copied over to each question (ideally only to questions with that have that dependency).
A simpler alternative implementation could be changing htmltools:::knit_print.html to directly / inline print the dependencies.
I have tested (somewhat manually)
leaflet (tiles appear broken, and parent div doesn't contain them correctly)
webr (works well, but text input and submit buttons cause question submission)
More generally, supporting external dependencies (header-includes) will improve the output with CSS features like code highlighting and improved table formatting.
The text was updated successfully, but these errors were encountered:
It appears to be technically possible to import js/css/etc. into a Moodle quiz question.
To accomplish this,
will need to be added to the template (bringing in the external dependencies). Then (probably with pandoc lua filters) these dependencies need to be copied over to each question (ideally only to questions with that have that dependency).
A simpler alternative implementation could be changing
htmltools:::knit_print.html
to directly / inline print the dependencies.I have tested (somewhat manually)
A custom dependency resolver could be a useful starting point:
https://github.com/rstudio/rmarkdown/blob/204879ff62c00df6b0910c4ed6a1f8e143c551e8/R/html_dependencies.R#L292-L304
More generally, supporting external dependencies (header-includes) will improve the output with CSS features like code highlighting and improved table formatting.
The text was updated successfully, but these errors were encountered: