Second debugging info
After taking a look at the previous debugging info, it seemed strange to me that at the do_group
function, the first debugging line (debugging("trying to enrol user now");
) from the if (isloggedin()){
section was not the one displayed (which I thought it would... after all, the user is logged in), and so I decided to change that line like so: if (!isloggedin()){
and do the test again (after having unroled the users from the course).
I logged in with user-1 and this time I got the following info:
Debug info: SELECT * FROM {user} WHERE id = ? [array ( 0 => 0, )] Error code: invaliduser Stack trace: line 1385 of \lib\dml\moodle_database.php: dml_missing_record_exception thrown line 1361 of \lib\dml\moodle_database.php: call to moodle_database->get_record_select() line 52 of \group\lib.php: call to moodle_database->get_record() line 374 of \enrol\autoenrol\lib.php: call to groups_add_member() line 185 of \enrol\autoenrol\lib.php: call to enrol_autoenrol_plugin->do_group() line 215 of \lib\enrollib.php: call to enrol_autoenrol_plugin->sync_user_enrolments() line 4312 of \lib\moodlelib.php: call to enrol_check_plugins() line 182 of \login\index.php: call to complete_user_login()
Output buffer:
Notice: Undefined property: stdClass::$auth in X:\mymoodle\enrol\autoenrol\lib.php on line 347
Notice: Undefined property: stdClass::$department in X:\mymoodle\enrol\autoenrol\lib.php on line 347
Notice: Undefined property: stdClass::$institution in X:\mymoodle\enrol\autoenrol\lib.php on line 347
Notice: Undefined property: stdClass::$lang in X:\mymoodle\enrol\autoenrol\lib.php on line 347
After selecting the Continue button, the user-2 was kicked out (logged out).
I then logged in as admin and went to check the course. This time:
- user user-1 was enroled, as expected.
- a group Auto|g_ was created (notice that that string appears at the debug info) with the following group description:
This group has been automatically created by the Auto Enrol plugin. It will be deleted if you remove the Auto Enrol plugin from the course.
After logging in with user-2, I got:
Debug info: SELECT * FROM {user} WHERE id = ?
[array (
0 => 0,
)]
Error code: invaliduser
Stack trace:
line 1385 of \lib\dml\moodle_database.php: dml_missing_record_exception thrown
line 1361 of \lib\dml\moodle_database.php: call to moodle_database->get_record_select()
line 52 of \group\lib.php: call to moodle_database->get_record()
line 374 of \enrol\autoenrol\lib.php: call to groups_add_member()
line 185 of \enrol\autoenrol\lib.php: call to enrol_autoenrol_plugin->do_group()
line 215 of \lib\enrollib.php: call to enrol_autoenrol_plugin->sync_user_enrolments()
line 4312 of \lib\moodlelib.php: call to enrol_check_plugins()
line 182 of \login\index.php: call to complete_user_login()
Output buffer:
Notice: Undefined property: stdClass::$auth in X:\mymoodle\enrol\autoenrol\lib.php on line 347
Notice: Undefined property: stdClass::$department in X:\mymoodle\enrol\autoenrol\lib.php on line 347
Notice: Undefined property: stdClass::$institution in X:\mymoodle\enrol\autoenrol\lib.php on line 347
Notice: Undefined property: stdClass::$lang in X:\mymoodle\enrol\autoenrol\lib.php on line 347
As before, user-2 was logged out but enroled into the course.
Well, the release 1.2 plugin certainly seems to have a bug; I hope this information will help finding it and fixing it.