Skip to content

Commit

Permalink
Merge branch 'MDL-74784-400' of https://github.com/sarjona/moodle int…
Browse files Browse the repository at this point in the history
…o MOODLE_400_STABLE
  • Loading branch information
junpataleta committed Jul 11, 2022
2 parents d069cb9 + b259811 commit 0476854
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion badges/classes/output/issued_badge.php
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 0476854

Please sign in to comment.