Open OlenaTatarintseva opened 5 years ago
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. :)
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
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.
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:
Group will be created well with user enrolled, error shown does not interrupt plugin.
Best regards, Olena Tatarintseva