Moodle
  1. Moodle
  2. MDL-21907

A course's default grouping determines the groups to filter by in the grade book.

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.9.7, 1.9.8, 1.9.9, 2.0
    • Fix Version/s: STABLE backlog
    • Component/s: Gradebook
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Rank:
      1196

      Description

      When viewing the gradebook the groups to filter the results by are determined by the default grouping id set in the course settings.

      In the file lib/grouplib.php the function groups_print_course_menu which is responsible for printing the group menu selector calls the function groups_get_all_groups on line 349 and 365 which passes the course's default grouping id, resulting in only groups displaying that belong to that particular default grouping. I believe the default grouping id should not be considered when displaying groups to filter by.

      Fix: Pass 0 as the grouping id.

      Temporary Fix: To display all groups in the select box you must change the course's setting default grouping to none.

        Activity

        Hide
        Andrew Davis added a comment -

        Committed to both 1.9 and 2.0 branches. Thanks for the report

        Show
        Andrew Davis added a comment - Committed to both 1.9 and 2.0 branches. Thanks for the report
        Hide
        Tim Hunt added a comment -

        This commit is really bad. Sorry, but I have to reopen this.

        At the OU, we have staff, basically non-editing teachers in Moodle terms, but without the Access all groups capability. for data-protection reasons. It is an important requirement that such people can only see the grades for people in their tutor group. Some courses, have a tutor-group grouping, and other groupings.

        So, it is essential that the gradebook uses the course grouping, at least for SEPARATE groups mode, and when the user does not have Access all groups.

        In other words, looking at your patch (http://cvs.moodle.org/moodle/lib/grouplib.php?r1=1.22.2.10&r2=1.22.2.11), the change to line 349 is probably good, but the change to line 365 must be reverted.

        I hope that is OK. I am sure that the OU is not the only one who will want this.

        Show
        Tim Hunt added a comment - This commit is really bad. Sorry, but I have to reopen this. At the OU, we have staff, basically non-editing teachers in Moodle terms, but without the Access all groups capability. for data-protection reasons. It is an important requirement that such people can only see the grades for people in their tutor group. Some courses, have a tutor-group grouping, and other groupings. So, it is essential that the gradebook uses the course grouping, at least for SEPARATE groups mode, and when the user does not have Access all groups. In other words, looking at your patch ( http://cvs.moodle.org/moodle/lib/grouplib.php?r1=1.22.2.10&r2=1.22.2.11 ), the change to line 349 is probably good, but the change to line 365 must be reverted. I hope that is OK. I am sure that the OU is not the only one who will want this.
        Hide
        Petr Škoda added a comment -

        I agree completely with Tim, I have reverted the commits. (sorry for the wrong message in HEAD, grrr)

        Let's discuss this again on Monday.

        Show
        Petr Škoda added a comment - I agree completely with Tim, I have reverted the commits. (sorry for the wrong message in HEAD, grrr) Let's discuss this again on Monday.
        Hide
        Andrew Davis added a comment - - edited

        Update: Ive spoken to Petr about this and this is more complicated that I thought. Because both students and activities can be in groupings the notion of selecting a grouping then showing only the students and activities in it is... complex. It can be done but it cannot be done right now.

        For a user to be able to view all groups would require a capability check at the course level. Trying to do it at a lower level would make this even more difficult.

        Show
        Andrew Davis added a comment - - edited Update: Ive spoken to Petr about this and this is more complicated that I thought. Because both students and activities can be in groupings the notion of selecting a grouping then showing only the students and activities in it is... complex. It can be done but it cannot be done right now. For a user to be able to view all groups would require a capability check at the course level. Trying to do it at a lower level would make this even more difficult.
        Hide
        Andrew Davis added a comment -

        Hello. I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.

        For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

        If you have any information about this issue or a possible fix please post it here

        Show
        Andrew Davis added a comment - Hello. I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment If you have any information about this issue or a possible fix please post it here

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: