mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-14129, fix misuse string
This commit is contained in:
parent
e31a98a6e1
commit
a4f9dc75da
2 changed files with 5 additions and 3 deletions
|
@ -18,18 +18,18 @@
|
|||
if (!empty($id)) {
|
||||
require_login($id);
|
||||
if (!has_capability('moodle/site:backup', get_context_instance(CONTEXT_COURSE, $id))) {
|
||||
print_error('cannotusepage', 'error', "$CFG->wwwroot/login/index.php");
|
||||
print_error('cannotuseadminadminorteacher', 'error', "$CFG->wwwroot/login/index.php");
|
||||
}
|
||||
} else {
|
||||
require_login();
|
||||
if (!has_capability('moodle/site:backup', get_context_instance(CONTEXT_SYSTEM))) {
|
||||
print_error('cannotusepage', 'error', "$CFG->wwwroot/login/index.php");
|
||||
print_error('cannotuseadmin', 'error', "$CFG->wwwroot/login/index.php");
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($to)) {
|
||||
if (!has_capability('moodle/site:backup', get_context_instance(CONTEXT_COURSE, $to))) {
|
||||
print_error('cannotusepage', 'error', "$CFG->wwwroot/login/index.php");
|
||||
print_error('cannotuseadminadminorteacher', 'error', "$CFG->wwwroot/login/index.php");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue