Skip to content

Commit

Permalink
fix codechecker errors
Browse files Browse the repository at this point in the history
  • Loading branch information
my-curiosity committed Jan 19, 2024
1 parent 3e5cbcc commit 4d78f17
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions block_overviewmyrolesincourses.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,9 @@ private function create_category(stdClass $course): string {
$category = $DB->get_record("course_categories", ['id' => $courserecord->category]);
$categorypatharray = explode("/", $category->path);
$topcategory = $DB->get_record("course_categories", ['id' => $categorypatharray[1]]);
if ($topcategory->visible == 1 || has_capability('moodle/category:viewhiddencategories', $coursecontext)){
if ($topcategory->visible == 1 || has_capability('moodle/category:viewhiddencategories', $coursecontext)) {
return $topcategory->name;
}
else {
} else {
return get_string('categoryhidden');
}
} else {
Expand Down

0 comments on commit 4d78f17

Please sign in to comment.