$status = false;
break;
}
+
+ //Get an object for the block and tell it it's been restored so it can update dates
+ //etc. if necessary
+ $blockobj=block_instance($instance->name,$instance);
+ $blockobj->after_restore($restore);
//Now we can increment the weight counter
++$maxweights[$instance->position];
}
}
-?>
+?>
\ No newline at end of file
*/
function before_delete() {
}
+
+ /**
+ * Function that can be overridden to do extra setup after a block instance has been
+ * restored from backup. For example, it may need to alter any dates that the block
+ * stores, if the $restore->course_startdateoffset is set.
+ */
+ function after_restore($restore) {
+ }
/**
* Returns the block name, as present in the class name,
}
-?>
+?>
\ No newline at end of file