mirror of
https://github.com/moodle/moodle.git
synced 2025-08-02 23:59:41 +02:00
Merge branch 'MDL-43978_master' of https://github.com/totara/openbadges
This commit is contained in:
commit
fbf1f6fdea
2 changed files with 8 additions and 3 deletions
|
@ -42,7 +42,14 @@ if (empty($CFG->enablebadges)) {
|
|||
print_error('badgesdisabled', 'badges');
|
||||
}
|
||||
|
||||
$url = new moodle_url('/badges/mybadges.php');
|
||||
$PAGE->set_url($url);
|
||||
|
||||
if (isguestuser()) {
|
||||
$PAGE->set_context(context_system::instance());
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->box(get_string('error:guestuseraccess', 'badges'), 'notifyproblem');
|
||||
echo $OUTPUT->footer();
|
||||
die();
|
||||
}
|
||||
|
||||
|
@ -80,9 +87,6 @@ if ($hide) {
|
|||
$context = context_user::instance($USER->id);
|
||||
require_capability('moodle/badges:manageownbadges', $context);
|
||||
|
||||
$url = new moodle_url('/badges/mybadges.php');
|
||||
|
||||
$PAGE->set_url($url);
|
||||
$PAGE->set_context($context);
|
||||
|
||||
$title = get_string('mybadges', 'badges');
|
||||
|
|
|
@ -223,6 +223,7 @@ $string['error:connectionunknownreason'] = 'The connection was unsuccessful but
|
|||
$string['error:clone'] = 'Cannot clone the badge.';
|
||||
$string['error:duplicatename'] = 'Badge with such name already exists in the system.';
|
||||
$string['error:externalbadgedoesntexist'] = 'Badge not found';
|
||||
$string['error:guestuseraccess'] = 'You are currently using guest access. To see badges you need to log in with your user account.';
|
||||
$string['error:invalidbadgeurl'] = 'Invalid badge issuer URL format.';
|
||||
$string['error:invalidcriteriatype'] = 'Invalid criteria type.';
|
||||
$string['error:invalidexpiredate'] = 'Expiry date has to be in the future.';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue