? files.auditing.patch
Index: files/index.php
===================================================================
RCS file: /cvsroot/moodle/moodle/files/index.php,v
retrieving revision 1.121.2.8
diff -u -r1.121.2.8 index.php
--- files/index.php	13 Dec 2008 02:19:41 -0000	1.121.2.8
+++ files/index.php	7 May 2009 09:30:03 -0000
@@ -243,8 +243,11 @@
                     foreach ($USER->filelist as $file) {
                         $fullfile = $basedir.'/'.$file;
                         if (! fulldelete($fullfile)) {
+			    add_to_log($course->id, 'files', 'delete', '', 'ERROR: ' . $fullfile);
                             echo "<br />Error: Could not delete: $fullfile";
-                        }
+                        } else {
+                            add_to_log($course->id, 'files', 'delete', '', 'OK: ' . $fullfile);
+			}
                     }
                 }
                 clearfilelist();
