mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 13:33:52 +02:00
MDL-8906 - Actually, I'll Fix blocks editing on search pages, by adding the query - merged from MOODLE_18_STABLE
This commit is contained in:
parent
2e2e52c7d9
commit
a989172a5c
@ -117,11 +117,14 @@ class page_admin extends page_base {
|
||||
// if not, print_header() has to be called with a $section parameter
|
||||
|
||||
// The search page currently doesn't handle block editing
|
||||
if ($this->section != 'search' and $this->user_allowed_editing()) {
|
||||
if ($this->user_allowed_editing()) {
|
||||
$buttons = '<div><form '.$CFG->frametarget.' method="get" action="' . $this->url_get_path() . '">'.
|
||||
'<div><input type="hidden" name="adminedit" value="'.($this->user_is_editing()?'off':'on').'" />'.
|
||||
'<input type="hidden" name="section" value="'.$this->section.'" />'.
|
||||
'<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></div></form></div>';
|
||||
'<input type="hidden" name="section" value="'.$this->section.'" />';
|
||||
if(isset($CFG->adminsearchquery)){
|
||||
$buttons.='<input type="hidden" name="query" value="'.$CFG->adminsearchquery.'" />';
|
||||
}
|
||||
$buttons.='<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></div></form></div>';
|
||||
} else {
|
||||
$buttons = ' ';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user