mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 20:50:21 +01:00
blocks editing ui: MDL-19398 block.multiple column no longer exists, so remove admin for it.
This commit is contained in:
parent
308240b164
commit
95eecbd893
@ -12,7 +12,6 @@
|
||||
$hide = optional_param('hide', 0, PARAM_INT);
|
||||
$show = optional_param('show', 0, PARAM_INT);
|
||||
$delete = optional_param('delete', 0, PARAM_INT);
|
||||
$multiple = optional_param('multiple', 0, PARAM_INT);
|
||||
|
||||
/// Print headings
|
||||
|
||||
@ -24,7 +23,6 @@
|
||||
$strsettings = get_string('settings');
|
||||
$strcourses = get_string('blockinstances', 'admin');
|
||||
$strname = get_string('name');
|
||||
$strmultiple = get_string('blockmultiple', 'admin');
|
||||
$strshowblockcourse = get_string('showblockcourse');
|
||||
|
||||
/// If data submitted, then process and store.
|
||||
@ -45,15 +43,6 @@
|
||||
admin_get_root(true, false); // settings not required - only pages
|
||||
}
|
||||
|
||||
if (!empty($multiple) && confirm_sesskey()) {
|
||||
if (!$block = blocks_get_record($multiple)) {
|
||||
print_error('blockdoesnotexist', 'error');
|
||||
}
|
||||
$block->multiple = !$block->multiple;
|
||||
$DB->update_record('block', $block);
|
||||
admin_get_root(true, false); // settings not required - only pages
|
||||
}
|
||||
|
||||
if (!empty($delete) && confirm_sesskey()) {
|
||||
admin_externalpage_print_header();
|
||||
print_heading($strmanageblocks);
|
||||
@ -141,8 +130,8 @@
|
||||
|
||||
$table = new flexible_table('admin-blocks-compatible');
|
||||
|
||||
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'multiple', 'delete', 'settings'));
|
||||
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strmultiple, $strdelete, $strsettings));
|
||||
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'delete', 'settings'));
|
||||
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strdelete, $strsettings));
|
||||
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
|
||||
$table->set_attribute('id', 'blocks');
|
||||
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
|
||||
@ -187,24 +176,12 @@
|
||||
'<img src="'.$OUTPUT->old_icon_url('i/show') . '" class="icon" alt="'.$strshow.'" /></a>';
|
||||
$class = ' class="dimmed_text"'; // Leading space required!
|
||||
}
|
||||
if ($blockobject->instance_allow_multiple()) {
|
||||
if($blocks[$blockid]->multiple) {
|
||||
$multiple = '<span style="white-space: nowrap;">'.get_string('yes').' (<a href="blocks.php?multiple='.$blockid.'&sesskey='.sesskey().'">'.get_string('change', 'admin').'</a>)</span>';
|
||||
}
|
||||
else {
|
||||
$multiple = '<span style="white-space: nowrap;">'.get_string('no').' (<a href="blocks.php?multiple='.$blockid.'&sesskey='.sesskey().'">'.get_string('change', 'admin').'</a>)</span>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$multiple = '';
|
||||
}
|
||||
|
||||
$table->add_data(array(
|
||||
'<span'.$class.'>'.$blockobject->get_title().'</span>',
|
||||
$blocklist,
|
||||
'<span'.$class.'>'.$blockobject->get_version().'</span>',
|
||||
$visible,
|
||||
$multiple,
|
||||
$delete,
|
||||
$settings
|
||||
));
|
||||
|
Loading…
x
Reference in New Issue
Block a user