MDL-67924 core: Now show the editing button everywhere
This commit is contained in:
@@ -4434,29 +4434,6 @@ class settings_navigation extends navigation_node {
|
||||
$coursenode->add(get_string('editsettings'), $url, self::TYPE_SETTING, null, 'editsettings', new pix_icon('i/settings', ''));
|
||||
}
|
||||
|
||||
if ($this->page->user_allowed_editing()) {
|
||||
// Add the turn on/off settings
|
||||
|
||||
if ($this->page->url->compare(new moodle_url('/course/view.php'), URL_MATCH_BASE)) {
|
||||
// We are on the course page, retain the current page params e.g. section.
|
||||
$baseurl = clone($this->page->url);
|
||||
$baseurl->param('sesskey', sesskey());
|
||||
} else {
|
||||
// Edit on the main course page.
|
||||
$baseurl = new moodle_url('/course/view.php', array('id'=>$course->id, 'return'=>$this->page->url->out_as_local_url(false), 'sesskey'=>sesskey()));
|
||||
}
|
||||
|
||||
$editurl = clone($baseurl);
|
||||
if ($this->page->user_is_editing()) {
|
||||
$editurl->param('edit', 'off');
|
||||
$editstring = get_string('turneditingoff');
|
||||
} else {
|
||||
$editurl->param('edit', 'on');
|
||||
$editstring = get_string('turneditingon');
|
||||
}
|
||||
$coursenode->add($editstring, $editurl, self::TYPE_SETTING, null, 'turneditingonoff', new pix_icon('i/edit', ''));
|
||||
}
|
||||
|
||||
if ($adminoptions->editcompletion) {
|
||||
// Add the course completion settings link
|
||||
$url = new moodle_url('/course/completion.php', array('id' => $course->id));
|
||||
|
||||
Reference in New Issue
Block a user