blocks editing ui: MDL-19398 Can now edit the position of any block.

I think this is probaby insecure at the moment. I am still working on it.
This commit is contained in:
tjhunt 2009-07-16 11:05:26 +00:00
parent 1d13c75c15
commit 73e2e5c03d
2 changed files with 4 additions and 6 deletions

View File

@ -57,7 +57,7 @@ $blockpage->set_url($url->out(true), $url->params());
$block = block_load_for_page($blockid, $blockpage);
if (!$block->user_can_edit() || (!$block->instance_allow_multiple() && !$block->instance_allow_config())) {
if (!$block->user_can_edit()) {
throw new moodle_exception('nopermissions', '', $page->url->out(), get_string('editblock'));
}

View File

@ -936,11 +936,9 @@ function block_edit_controls($block, $page) {
'icon' => 't/show', 'caption' => get_string('show'));
}
// Edit config icon.
if ($block->instance_allow_multiple() || $block->instance_allow_config()) {
$controls[] = array('url' => block_edit_url($block, $page)->out(),
'icon' => 't/edit', 'caption' => get_string('configuration'));
}
// Edit config icon - always show - needed for positioning UI.
$controls[] = array('url' => block_edit_url($block, $page)->out(),
'icon' => 't/edit', 'caption' => get_string('configuration'));
// Delete icon.
if ($block->user_can_addto($page)) {