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
@@ -153,7 +153,7 @@ function chat_delete_instance($id) {
$pagetypes = page_import_types('mod/chat/');
foreach($pagetypes as $pagetype) {
if (!$DB->delete_records('block_instance', array('pageid'=>$chat->id, 'pagetype'=>$pagetype))) {
if(!blocks_delete_all_on_page($pagetype, $chat->id)) {
$result = false;
}
}