Groups and Users

Groups and Users

by Hal MacLean -
Number of replies: 1

I have found a weird little issue when trying to group some users in a course. There are multiple groups in the course and all seems well, but occasionally, for whatever reason, we end up with a user not in any group. That's simple enough to fix:  find the group, add the user.

However it isn't quite as simple!

When I find the user and click on them to select and add to a group, Moodle helpfully tells me of the user's existing 'memberships'... see screen shot.

In the case here, the user is found as not in any group. When I go to group him I am told he has a membership to another group, except when I go to check that group he is not in it... and selecting him reveals yet another 'membership' to a further group... and yes, he's not a member of that one either! Selecting him there shows membership of the ORGINAL group...

So I am highly confused - I've no idea really why this is happening, only that it does. We auto-group our users from an external script, and we've worked through that line by line - it works 99% of the time and no errors in the code... but occasionally users fall into 'no group'. 

Am I mis-reading the Moodle screen? Does 'membership' mean something entirely different... or is there a degree of random going on?

Attachment moodle-groups1.png
Average of ratings: -
In reply to Hal MacLean

Re: Groups and Users

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

What happens if you ignore the message and add him to the group?  Does it work as expected?  I suspect you have a data error somewhere in the database but if the student can be added to the group you want and actually is not in the other groups, I would probably just ignore the strange messages until someone can actually look at the database and see if they can find out what is going on there.