mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merge branch 'MDL-50340-master' of git://github.com/ankitagarwal/moodle
This commit is contained in:
commit
de6b4e9dac
@ -46,7 +46,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
||||
$ADMIN->add('courses',
|
||||
new admin_externalpage('restorecourse', new lang_string('restorecourse', 'admin'),
|
||||
new moodle_url('/backup/restorefile.php', array('contextid' => context_system::instance()->id)),
|
||||
array('moodle/course:create')
|
||||
array('moodle/restore:restorecourse')
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -2401,7 +2401,7 @@ class coursecat implements renderable, cacheable_object, IteratorAggregate {
|
||||
* @return bool
|
||||
*/
|
||||
public function can_restore_courses_into() {
|
||||
return has_capability('moodle/course:create', $this->get_context());
|
||||
return has_capability('moodle/restore:restorecourse', $this->get_context());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4601,7 +4601,7 @@ class settings_navigation extends navigation_node {
|
||||
}
|
||||
|
||||
// Restore.
|
||||
if (has_capability('moodle/course:create', $catcontext)) {
|
||||
if (has_capability('moodle/restore:restorecourse', $catcontext)) {
|
||||
$url = new moodle_url('/backup/restorefile.php', array('contextid' => $catcontext->id));
|
||||
$categorynode->add(get_string('restorecourse', 'admin'), $url, self::TYPE_SETTING, null, 'restorecourse', new pix_icon('i/restore', ''));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user