Index: html/block_html.php
=========================================================
--- html/block_html.php	(revision 1.22)
+++ html/block_html.php	Mon May 17 11:13:16 WST 2010
@@ -60,6 +60,12 @@
         parent::instance_config_save($data, $nolongerused);
     }
 
+    function instance_delete() {
+        global $DB;
+        $fs = get_file_storage();
+        $fs->delete_area_files($this->context->id, 'block_html', $this->instance->id);
+        return true;
+    }
 
     function content_is_trusted() {
         return in_array($this->page->context->contextlevel, array(CONTEXT_COURSE, CONTEXT_COURSECAT, CONTEXT_SYSTEM));
@@ -115,6 +121,7 @@
 
         return true;
     }
+
     function send_file($context, $filearea, $itemid, $filepath, $filename) {
         $fs = get_file_storage();
         $fullpath = $context->id.'block_html'.$itemid.$filepath.$filename;
@@ -127,4 +134,3 @@
         send_stored_file($file, 60*60, 0, false);
     }
 }
-
