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

Fix comparison of temp and Moodle data file

parent 61aec703
No related branches found
No related tags found
No related merge requests found
...@@ -183,7 +183,7 @@ function filter_jmol_replace_callback($matches) { ...@@ -183,7 +183,7 @@ function filter_jmol_replace_callback($matches) {
if ($filearea === 'content') { if ($filearea === 'content') {
$itemid = 0; $itemid = 0;
} }
// required for mod_quiz // required for mod_quiz.
if ($filearea === 'questiontext') { if ($filearea === 'questiontext') {
$itemid = array_pop($args); ; $itemid = array_pop($args); ;
$filepath='/'; $filepath='/';
...@@ -205,7 +205,7 @@ function filter_jmol_replace_callback($matches) { ...@@ -205,7 +205,7 @@ function filter_jmol_replace_callback($matches) {
if (!file_exists($destpath)) { if (!file_exists($destpath)) {
mkdir(dirname($destpath), 0755, true); mkdir(dirname($destpath), 0755, true);
$file->copy_content_to($destpath); $file->copy_content_to($destpath);
} else if (sha1($file->get_content()) != sha1($destpath)) { } else if (sha1($file->get_content()) !== sha1_file($destpath)) {
$file->copy_content_to($destpath); $file->copy_content_to($destpath);
} else { } else {
// Touch file to update timestamp. // Touch file to update timestamp.
......
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