mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-19163 restore - warn if restoring over SITEID course ; merged from 19_STABLE
This commit is contained in:
parent
d35df1b54a
commit
a34947c283
1 changed files with 9 additions and 0 deletions
|
@ -291,6 +291,15 @@
|
||||||
$show_continue_button = true;
|
$show_continue_button = true;
|
||||||
$messages = array();
|
$messages = array();
|
||||||
|
|
||||||
|
//Check and warn if we are restoring over frontpage (SITEID) course. MDL-19163
|
||||||
|
if ($restore->course_id == SITEID) {
|
||||||
|
if ($restore->restoreto == 0) {
|
||||||
|
$messages[] = get_string ('restoretositedeleting');
|
||||||
|
} else if ($restore->restoreto == 1) {
|
||||||
|
$messages[] = get_string ('restoretositeadding');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Check if we've selected any mod's user info and restore->users
|
//Check if we've selected any mod's user info and restore->users
|
||||||
//is set to none. Change it to course and inform.
|
//is set to none. Change it to course and inform.
|
||||||
if ($restore->users == 2) {
|
if ($restore->users == 2) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue