From 12e6ee6e8e696026cc0c26853fdb4574dd2ba800 Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Thu, 16 Sep 2004 04:50:21 +0000 Subject: [PATCH] Added clam_log_upload where move_uploaded_file is in quiz/format/coursetestmanager/format.php (validated and scanned before given to function) These patches are maintained in an publicly accessible Arch repository, see: http://lists.eduforge.org/cgi-bin/archzoom.cgi/arch-eduforge@catalyst.net.nz--2004-MIRROR/moodle--eduforge--1.3.3 Index of arch patches in this commit: arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-71 2004-09-16 04:48:07 GMT Penny Leach difficult to integrate quiz coursetestmanager format with the upload stuff so added logging as well. files are scanned from import.php before passed to coursetestmanager format to process Full logs: Revision: moodle--eduforge--1.3.3--patch-71 Archive: arch-eduforge@catalyst.net.nz--2004 Creator: Penny Leach Date: Thu Sep 16 16:48:07 NZST 2004 Standard-date: 2004-09-16 04:48:07 GMT Modified-files: mod/quiz/format/coursetestmanager/format.php New-patches: arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-71 Summary: difficult to integrate quiz coursetestmanager format with the upload stuff so added logging as well. files are scanned from import.php before passed to coursetestmanager format to process Keywords: --- mod/quiz/format/coursetestmanager/format.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mod/quiz/format/coursetestmanager/format.php b/mod/quiz/format/coursetestmanager/format.php index b776512487..18cbe553a6 100755 --- a/mod/quiz/format/coursetestmanager/format.php +++ b/mod/quiz/format/coursetestmanager/format.php @@ -6,7 +6,7 @@ //////////////////////////////////////////////////////////////////// // Based on format.php, included by ../../import.php - +require_once($CFG->dirroot.'/lib/uploadlib.php'); class quiz_file_format { function importpreprocess($category) { @@ -41,6 +41,7 @@ class quiz_file_format { $newfile = "$basedir/$cleanfilename"; if (move_uploaded_file($filename, $newfile)) { chmod($newfile, 0666); + clam_log_upload($newfile,$course); } else { notify(get_string("uploadproblem", "", $filename)); } @@ -95,6 +96,7 @@ class quiz_file_format { $newfile = "$basedir/$cleanfilename"; if (move_uploaded_file($filename, $newfile)) { chmod($newfile, 0666); + clam_log_upload($newfile,$course); } else { notify(get_string("uploadproblem", "", $filename)); } -- 2.39.5