Skip to content

Commit

Permalink
MDL-14129, fix misuse string
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsheng committed Apr 23, 2008
1 parent e31a98a commit a4f9dc7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backup/backup.php
Expand Up @@ -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");
}
}

Expand Down
2 changes: 2 additions & 0 deletions lang/en_utf8/error.php
Expand Up @@ -39,6 +39,8 @@
$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.';
Expand Down

0 comments on commit a4f9dc7

Please sign in to comment.