Skip to content
Snippets Groups Projects
Commit 61aec703 authored by Geoff Rowland's avatar Geoff Rowland
Browse files

Fix for JSmol in Question Answers

parent ee1c2c18
No related branches found
No related tags found
No related merge requests found
...@@ -188,6 +188,10 @@ function filter_jmol_replace_callback($matches) { ...@@ -188,6 +188,10 @@ function filter_jmol_replace_callback($matches) {
$itemid = array_pop($args); ; $itemid = array_pop($args); ;
$filepath='/'; $filepath='/';
} }
if ($filearea === 'answer') {
$itemid = array_pop($args); ;
$filepath='/';
}
$fs = get_file_storage(); $fs = get_file_storage();
$file = $fs->get_file($contextid, $component, $filearea, $itemid, $filepath, $filename); $file = $fs->get_file($contextid, $component, $filearea, $itemid, $filepath, $filename);
// Copy data files from Moodle file API to temporary physical filesystem. // Copy data files from Moodle file API to temporary physical filesystem.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment