Moodle
  1. Moodle
  2. MDL-37578

Make 'navshowallcourses' a capability so some roles can always view all courses.

    Details

    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Rank:
      47233

      Description

      Currently the 'navshowallcourses' (in Settings > Site administration > Appearance > Navigation) controls displaying the 'Courses' branch in the Navigation block for ALL users.

      I would like this option changed so you can restrict it to different users/roles. This could be done by changing it to a capability. The setting then can be modified like other capabilities in 'Manage Roles' (Settings > Site administration > Users > Permissions > Define roles, and then edit the definition of one of the roles).

      The default option for most of the roles would be 'false'. But for roles not typically involved in courses (ie Admin and Managers) it could be set to 'true', so if they become involved in one of the courses the 'Courses' branch does not disappear.

        Activity

        Hide
        Dean Leggo added a comment -

        The only problem I can see with this, is that control would be taken away from the other navigation settings and this could confuse people and not make it simple.

        The checkbox for 'Show all courses' could be replaced with a 'multiple form selection box' so the Administrator could select different roles to enable this option. Like the form in Settings > Site administration > Users > Permissions > User policies, 'Hide user fields'.

        This would affect the global settings and then the setting could be changed for individual users by going to a user and changing their permissions (Settings > My profile settings > Roles > Permissions).

        Show
        Dean Leggo added a comment - The only problem I can see with this, is that control would be taken away from the other navigation settings and this could confuse people and not make it simple. The checkbox for 'Show all courses' could be replaced with a 'multiple form selection box' so the Administrator could select different roles to enable this option. Like the form in Settings > Site administration > Users > Permissions > User policies, 'Hide user fields'. This would affect the global settings and then the setting could be changed for individual users by going to a user and changing their permissions (Settings > My profile settings > Roles > Permissions).
        Hide
        Dean Leggo added a comment -

        The 'Show all courses' setting in Navigation could be replaced with a selection box like this.

        Show
        Dean Leggo added a comment - The 'Show all courses' setting in Navigation could be replaced with a selection box like this.
        Hide
        Rajesh Taneja added a comment -

        Thanks for reporting this.

        I have put that on the backlog and added Sam as watcher to get his opinion.

        In the meantime feel free to help us work on this issue. If you are able to provide a patch or links to your Git repository branch, please add a patch label so we will spot it.

        Show
        Rajesh Taneja added a comment - Thanks for reporting this. I have put that on the backlog and added Sam as watcher to get his opinion. In the meantime feel free to help us work on this issue. If you are able to provide a patch or links to your Git repository branch, please add a patch label so we will spot it.
        Hide
        Dean Leggo added a comment -

        Thanks Rajesh :-D
        I've been working on it but I'm having trouble setting up a test server and learning git. If it gets to the top of your 'to do list' and I haven't posted anything, you can move on and fix it. It'll be a good learning experience for me

        Show
        Dean Leggo added a comment - Thanks Rajesh :-D I've been working on it but I'm having trouble setting up a test server and learning git. If it gets to the top of your 'to do list' and I haven't posted anything, you can move on and fix it. It'll be a good learning experience for me
        Hide
        Rajesh Taneja added a comment -

        Thanks for working on this Dean.

        Let us know, if we can be of any help resolving this issue.

        Show
        Rajesh Taneja added a comment - Thanks for working on this Dean. Let us know, if we can be of any help resolving this issue.
        Hide
        Teresa Gibbison added a comment -

        I think this would be a good idea - we'd like users NOT enrolled in any courses to NOT have the 'Courses' link on the navigation. Our students are added to courses by our student management system. We've had to hack the code to remove it (even though the 'navshowallcourses' is not ticked - that only seems to affect those enrolled in a course) so students who haven't enrolled in a course yet are not confused when they see everything!

        Show
        Teresa Gibbison added a comment - I think this would be a good idea - we'd like users NOT enrolled in any courses to NOT have the 'Courses' link on the navigation. Our students are added to courses by our student management system. We've had to hack the code to remove it (even though the 'navshowallcourses' is not ticked - that only seems to affect those enrolled in a course) so students who haven't enrolled in a course yet are not confused when they see everything!

          People

          • Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated: