moodle-an-hochschulen / moodle-local_boostnavigation

Moodle plugin which tries to overcome some fixed appearance behaviours of Boost's nav drawer in a clean way
GNU General Public License v3.0
39 stars 27 forks source link

allow course "grade" node to be removed #25

Closed danmarsden closed 5 years ago

danmarsden commented 5 years ago

would be quite nice for us to be able to remove the grades node like this - no time to file pull request but might get to it next week...


    if ($PAGE->context->get_course_context(false) == true && $COURSE->id != SITEID) {
        if ($gradesnode = $navigation->find('grades', global_navigation::TYPE_SETTING)) {
            // Remove grades node (Just hiding it with the showinflatnavigation attribute does not work here).
            $gradesnode->remove();
        }
    }
abias commented 5 years ago

Hi Dan,

this is now added as a new setting in https://github.com/moodleuulm/moodle-local_boostnavigation/commit/1a69b4d47b729447ef3944ffe90e5b5dfe47512d.

Please note that if you remove this node and access the gradebook page via direct URL, the page's breadcrumb will think that you are on the frontpage and the course navigation will also disappear from the nav drawer. This side effect also happens for the existing setting "Remove badges node" and there is nothing obvious which I could do about it, so I just thought I let you know.

Cheers, Alex

danmarsden commented 5 years ago

Awesome thanks Alex!