mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
backup MDL-22151 Added a backup link to the settings block for modules that support backup.
This commit is contained in:
parent
f45dfeeb76
commit
59c7680fe2
@ -2551,6 +2551,13 @@ class settings_navigation extends navigation_node {
|
||||
$modulenode->add(get_string('filters', 'admin'), $url, self::TYPE_SETTING);
|
||||
}
|
||||
|
||||
// Add a backup link
|
||||
$featuresfunc = $this->page->activityname.'_supports';
|
||||
if ($featuresfunc(FEATURE_BACKUP_MOODLE2) && has_capability('moodle/backup:backupactivity', $this->page->cm->context)) {
|
||||
$url = new moodle_url('/backup/backup.php', array('id'=>$this->page->cm->course, 'cm'=>$this->page->cm->id));
|
||||
$modulenode->add(get_string('backup'), $url, self::TYPE_SETTING);
|
||||
}
|
||||
|
||||
$file = $CFG->dirroot.'/mod/'.$this->page->activityname.'/lib.php';
|
||||
$function = $this->page->activityname.'_extend_settings_navigation';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user