Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When there is more than one Auto Group set (for example, two profile fields), error is shown with debuging on #20

Open
OlenaTatarintseva opened this issue Aug 13, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@OlenaTatarintseva
Copy link

Hello,

Sorry for the next issue adding. I just think it will be good to inform you.
When there is more than one Auto Group set (for example, two profile fields), error is shown with debuging on
"Exception encountered in event observer '\local_autogroup\event_handler::user_updated': This ID number is already in use".

Backtrace:
line 125 of /local/autogroup/classes/domain/group.php: call to groups_create_group()
line 405 of /local/autogroup/classes/domain/autogroup_set.php: call to local_autogroup\domain\group->create()
line 301 of /local/autogroup/classes/domain/autogroup_set.php: call to local_autogroup\domain\autogroup_set->get_or_create_group_by_idnumber()
line 100 of /local/autogroup/classes/domain/course.php: call to local_autogroup\domain\autogroup_set->verify_user_group_membership()
line 80 of /local/autogroup/classes/domain/user.php: call to local_autogroup\domain\course->verify_user_group_membership()
line 64 of /local/autogroup/classes/usecase/verify_user_group_membership.php: call to local_autogroup\domain\user->verify_user_group_membership()
line 154 of /local/autogroup/classes/event_handler.php: call to local_autogroup\usecase\verify_user_group_membership->__invoke()
line ? of unknownfile: call to local_autogroup\event_handler::user_updated()
line 155 of /lib/classes/event/manager.php: call to call_user_func()
line 75 of /lib/classes/event/manager.php: call to core\event\manager::process_buffers()
line 834 of /lib/classes/event/base.php: call to core\event\manager::dispatch()
line 282 of /user/editadvanced.php: call to core\event\base->trigger()

Steps to reproduce:

  1. Navigate to course and open auto groups (Course -> users -> groups -> auto groups)
  2. Click create new group set and pick any profile field
  3. Select only student as a role and save changes
  4. Repeat steps 2-3 just to add another auto-group with different profile field
  5. Navigate to users enrolled to that course and change their profile fields from step 2 or 4

Group will be created well with user enrolled, error shown does not interrupt plugin.

Best regards,
Olena Tatarintseva

@ak4t0sh
Copy link
Collaborator

ak4t0sh commented Aug 13, 2019

Thanks for reporting this issue. I was able to reproduce it.
I’ll try to look at it but if in the meantime you already fixed it do not hesitate to fill a PR. :)

@ak4t0sh ak4t0sh added the bug Something isn't working label Aug 13, 2019
@elyeszitari
Copy link

elyeszitari commented Apr 23, 2020

Hello,
Sorry, i confirm this issue, i have same problem,
actually is there any solution to get around th issue ?
Moodle version : Moodle 3.7.1+ (Build: 20190801)
Plugin installed version : 2.4.1

@emmarichardson
Copy link
Owner

Asides from the error message, which should be fixed at some point, this does not actually stop the plugin from working as far as I can tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants