Forums | Mahara Community

Support /
Not all own groups in search found


27 March 2020, 23:21

We have the problem that a user does not find all groups, he is a member of, with the group search (group/find.php?filter=member). Under 'my groups' (group/mygroups.php) all groups are listed correctly. The settings for the groups are the same. We use Mahara 18.10.4.

Does anyone have any ideas what the problem could be?

Thankful for any input!

Robert Lyon's profile picture
Posts: 773

30 March 2020, 9:29

Hi Stefanie,

From a quick look at the code the difference between those two searches are the "mygroup" search also includes the groups that one is invited to / requested membership of (so pending membership), where as "group/find.php?filter=member" does not include these groups.

Otherwise the search code looks to be similar

Cheers

Robert

30 March 2020, 18:35

Thanks for the tip! I'll look into that.

31 March 2020, 21:22

Hi Robert,

I found the problem. It wasn't about pending memberships but creating new groups via webservices while the user is logged in. The "group/find.php" search works with a user's grouproles and when a group is created via webservice the grouproles are not reset for the session. So only after the user logged out and logged in again, the group is found with "group/find.php".

Is this intended behaviour or will it be fixed? Can I do anything about it?

Thanks for the help

Robert Lyon's profile picture
Posts: 773

07 April 2020, 15:04

Hi Stefanie,

Thank you for investigating this and working out the problem.

I've made a patch here https://reviews.mahara.org/#/c/10864/ that I hope will sort the problem

What it does is when a group is created / updated then the members have a flag set in the usr_account_preference table and if that flag exists on next URL load for the user then their group roles session will be updated without them needing to logout

Feel free to try it out

Cheers

Robert

07 April 2020, 17:21

Thanks for the patch! It works just fine.

I'm not well informed with the process of patches/bugs, will it be included in further Mahara versions?

Robert Lyon's profile picture
Posts: 773

08 April 2020, 7:51

Hi Stefanie,

Thank you for testing the patch. Once it gets code reviewed by the Mahara team it will be included in the upcoming 20.04 release.

Cheers

Robert

08 April 2020, 16:35

Alright. Thanks for all the help, we really appreciate it!

8 results