Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-12991

Moodle groups interface should display the role of members and potential members



    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 1.9, 2.0
    • Component/s: Groups
    • Labels:
    • Database:
    • Affected Branches:
    • Fixed Branches:


      The groups interface used to distinguish between teachers and students. This has been removed in the transfer to the role system. All users are now displayed the same, which makes it less usable. Our administrators have requested that we put this feature back so I have.

      My implementation of the feature works as follows:

      • Users are categorised by course role (i.e. their role directly on the course). Each role displays, in role sortorder, as an optgroup followed by the people in it.
      • Users can also have 'no role' on the course (if they have a role at a higher level) or 'multiple roles' (if they have two or more roles on the course). These are shown under those headings. The expectation is that normal usage would see few cases of people in these categories, or that it would be clear which they correspond to (i.e. somebody with multiple roles is most probably the group leader).
      • The lists displayed (members, potential members) are both intended to contain identical lists of users to before these changes - just in different order and with role headings.
      • I have implemented this display in three list boxes: the list of members on the first groups screen, and both the 'members' and 'potential members' boxes on the add/remove users screen. I have implemented it when AJAX is on (which only seems to affect the first case) as well as off. I did this patch against Moodle HEAD, although I am happy to port to 1.9 if it is desired there.
      • Those looking at the patch will see a few other changes; I fixed a few minor wording things in the javascript. That's it though (I hope).
      • The 'business logic' is in several new functions in group/lib.php. (There are no changes to any behaviour or database aspects of any other part of the system, this is strictly group UI only.)

      Is this useful? If so, can I get the go ahead to commit it?

      I have attached 2 screenshots and the patch.


        1. CF101- Groups.png
          CF101- Groups.png
          13 kB
        2. CF101- Groups overview.png
          CF101- Groups overview.png
          14 kB
        3. groupuiroles.patch
          21 kB
        4. groupuiroles.patch
          23 kB

          Issue Links



              quen Sam Marshall
              quen Sam Marshall
              Nicolas Martignoni Nicolas Martignoni
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              0 Vote for this issue
              1 Start watching this issue


                Fix Release Date: