mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue