Skip to content

Commit

Permalink
backup MDL-22151 Added a backup link to the settings block for module…
Browse files Browse the repository at this point in the history
…s that support backup.
  • Loading branch information
Sam Hemelryk committed May 4, 2010
1 parent f45dfee commit 59c7680
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/navigationlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2551,6 +2551,13 @@ protected function load_module_settings() {
$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';

Expand Down

0 comments on commit 59c7680

Please sign in to comment.