blocks: MDL-19946 bugfixes for my previous commit.

This commit is contained in:
tjhunt
2009-07-29 03:19:43 +00:00
parent 07ce9b6434
commit 7bbc2890f7
+2 -2
View File
@@ -792,7 +792,7 @@ class block_manager {
$block = $this->page->blocks->find_instance($blockid);
if (!$block->user_can_edit() || !$this->page->user_can_edit_blocks() || !$block->user_can_addto($page)) {
if (!$block->user_can_edit() || !$this->page->user_can_edit_blocks() || !$block->user_can_addto($this->page)) {
throw new moodle_exception('nopermissions', '', $this->page->url->out(), get_string('deleteablock'));
}
@@ -859,7 +859,7 @@ class block_manager {
$editpage = new moodle_page();
$editpage->set_generaltype('form');
$editpage->set_course($this->page->course);
$editpage->set_context($this->page->context);
$editpage->set_context($block->context);
$editurlbase = str_replace($CFG->wwwroot . '/', '', $this->page->url->out(true));
$editurlparams = $this->page->url->params();
$editurlparams['bui_editid'] = $blockid;