mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
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:
parent
1d13c75c15
commit
73e2e5c03d
@ -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'));
|
||||
}
|
||||
|
||||
|
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user