Moodle – students can’t see category pages

In /course/index.php

add this code in line 64

if (($categoryid && !$category->visible && !has_capability('moodle/category:viewhiddencategories', $PAGE->context)) || !has_capability('local/awareness:course', $PAGE->context)) {
 throw new moodle_exception('unknowncategory');
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.