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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ $string['cannotsetupcategory'] = 'Serious Error! Could not set up a default cour
|
|||
$string['cannotsetupsite'] = 'Serious Error! Could not set up the site!';
|
||||
$string['cannotunzipfile'] = 'Cannot unzip file.';
|
||||
$string['cannotupdaterole'] = 'Cannot update role!';
|
||||
$string['cannotuseadmin'] = 'You need to be an admin user to use this page.';
|
||||
$string['cannotuseadminadminorteacher'] = 'You need to be a teacher or admin user to use this page.';
|
||||
$string['cannotusepage'] = 'Only teacher and administrator can use this page.';
|
||||
$string['cannotviewprofile'] = 'You can not view the profile of this user.';
|
||||
$string['cantunenrollfrommetacourse'] = 'You can not unenrol from this meta course.';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue