Moodle

groups_groupids_to_groups should return groups indexed by group ID

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8, 1.9
  • Fix Version/s: 1.8.1
  • Component/s: Groups
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

This function, which is relied on by user_group and get_groups, returns a list of group objects that correspond to the group ID array given. All fine except that the array is just indexed 0,1, etc. but it should be indexed by group ID.

Some usages of get_groups etc in legacy code (we noticed one in quiz results) rely on the array keys being IDs so these probably don't work at present. It might need more checking to ensure this is the expected behaviour throughout, but otherwise this fix should be checked in.

Issue Links

Activity

Hide
Petr Škoda (skodak) added a comment -

somebody already committed it

thanks!

Show
Petr Škoda (skodak) added a comment - somebody already committed it thanks!

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: