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:
+1
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user