Limit Navigation Block to only Show Categories and Courses for Guest Access

Limit Navigation Block to only Show Categories and Courses for Guest Access

by Laura Koepke -
Number of replies: 1

We are working on our 2.2 conversion from1.9 and I need to change the default behavior of the Navigation block for guests.  We have top level categories like Elementary Schools and Secondary Schools, inside each of those top level categories, we created categories for the different schools (about 26) and inside of the school categories we have categories for subject matter or a general, "Find you teacher".  When a guest goes to our home page, the Navigation Courses drop down only shows one category - Elementary Schools.  We can drill down and see all of the schools and teacher's sites inside of the Elementary category which is great - if you are a parent looking for an Elementary teacher. 

In Navigation, if I increase the number of courses to show from 20 to 100, I see no change in the number of categories and courses.  If I increase it to 500, I see most of the categories but then IE8 throws a warning about a slow script. 

Is there a way to have the Navigation block show guests only the categories and courses (no links to topics)?  I looked at the settings in the block and in Navigation but I couldn't find a way to change the behavior for a guest user.

Average of ratings: -
In reply to Laura Koepke

Re: Limit Navigation Block to only Show Categories and Courses for Guest Access

by Rosario Carcò -

I developed a siteNavigation Block in Moodle 1.9 to allow browsing through all categories also for not logged in people/guests.

As every course is protected by an enrolment key for privacy reasons, we allow everyone to see all categories and subcategories. Try here https://moodle.fhnw.ch

In my block you can decide per admin option to show also courses if you like. I combine the sitNavigation by categories with an own myCourses block which again per admin config option can show the nested categories or only a flat list of the users' courses.

I merged both blocks into a new version which offers also to display both blocks in popUp-windows. Try it here: https://moodle.fhnw.ch/moodleTest

As the navigation in Moodle 2.x offers most of my features I did not see any reason to port my code to 2.x But customization of the navigation which is deeply anchored into core seems to be a very difficult way to go. So either the core programmers accept to realize such features or I would have to port my code which is flexible enough to offer new features like letting the students decide on which courses to diplay, either all courses or only the ones they are attending during a given semester.

Rosario