MDL-43526 course: links to restore from management and admin structure.
This commit is contained in:
committed by
Dan Poltawski
parent
812cc702ad
commit
39bd07f732
@@ -26,7 +26,8 @@ $capabilities = array(
|
||||
'moodle/backup:backupcourse',
|
||||
'moodle/category:manage',
|
||||
'moodle/course:create',
|
||||
'moodle/site:approvecourse'
|
||||
'moodle/site:approvecourse',
|
||||
'moodle/restore:restorecourse'
|
||||
);
|
||||
if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
||||
// Speedup for non-admins, add all caps used on this page.
|
||||
@@ -42,6 +43,12 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
||||
array('moodle/category:manage')
|
||||
)
|
||||
);
|
||||
$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')
|
||||
)
|
||||
);
|
||||
|
||||
// Course Default Settings Page.
|
||||
// NOTE: these settings must be applied after all other settings because they depend on them.
|
||||
|
||||
Reference in New Issue
Block a user