Skip to content

Commit

Permalink
Merge branch 'MDL-74784-master' of https://github.com/sarjona/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Jul 11, 2022
2 parents df2276a + 1cedbd1 commit 399a922
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion badges/classes/output/issued_badge.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public function export_for_template(renderer_base $output): stdClass {
$data->hasrelatedbadges = true;
$data->relatedbadges = [];
foreach ($relatedbadges as $related) {
if (isloggedin() && !is_guest($context)) {
if (isloggedin() && ($context instanceof context_course && !is_guest($context))) {
$related->url = (new moodle_url('/badges/overview.php', ['id' => $related->id]))->out(false);
}
$data->relatedbadges[] = (array)$related;
Expand Down

0 comments on commit 399a922

Please sign in to comment.