accesslib: MDL-17626 delete the context whenever a block is deleted. This includes a new helper function blocks_delete_all_on_page.

This commit is contained in:
tjhunt
2009-01-09 06:16:36 +00:00
parent a3c9960b86
commit 19f5b2dbee
5 changed files with 27 additions and 7 deletions
+1 -1
View File
@@ -792,7 +792,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
global $CFG, $DB;
$status = true;
$DB->delete_records('block_instance', array('pageid'=>$restore->course_id, 'pagetype'=>PAGE_COURSE_VIEW));
blocks_delete_all_on_page(PAGE_COURSE_VIEW, $restore->course_id);
if (empty($backup_block_format)) { // This is a backup from Moodle < 1.5
if (empty($blockinfo)) {
// Looks like it's from Moodle < 1.3. Let's give the course default blocks...