You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
database: mariadbd Ver 10.11.2-MariaDB (from MariaDB official repo)
php version: PHP 7.4.33 (from remi repo)
operating system: RHEL 7.9
Actual behaviour
When adding a user to a group with userid:
$ sudo -u apache moosh group-memberadd -c "95" -g "260" "24268"
++ user_get_participants() is deprecated. Please use \core\table\participants_search::class with table filtersets instead. ++
* line 3182 of /lib/deprecatedlib.php: call to debugging()
* line 44 of /opt/moosh/Moosh/Command/Moodle39/Group/GroupMemberadd.php: call to user_get_participants()
* line 365 of /opt/moosh/moosh.php: call to Moosh\Command\Moodle39\Group\GroupMemberadd->execute()
++ user_get_participants_sql() is deprecated. Please use \core\table\participants_search::class with table filtersets instead. ++
* line 2944 of /lib/deprecatedlib.php: call to debugging()
* line 3185 of /lib/deprecatedlib.php: call to user_get_participants_sql()
* line 44 of /opt/moosh/Moosh/Command/Moodle39/Group/GroupMemberadd.php: call to user_get_participants()
* line 365 of /opt/moosh/moosh.php: call to Moosh\Command\Moodle39\Group\GroupMemberadd->execute()
Notice: Undefined offset: 24268 in /opt/moosh/Moosh/Command/Moodle39/Group/GroupMemberadd.php on line 58
Default exception handler: Invalid user Debug: SELECT * FROM {user} WHERE id IS NULL
[array (
)]
Error code: invaliduser
* line 1654 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
* line 1630 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 59 of /opt/moosh/Moosh/Command/Moodle39/Group/GroupMemberadd.php: call to groups_add_member()
* line 365 of /opt/moosh/moosh.php: call to Moosh\Command\Moodle39\Group\GroupMemberadd->execute()
!!! Invalid user !!!
When adding a user to a group with username:
$ sudo -u apache moosh group-memberadd -c "95" -g "260" "email@example.com"
++ user_get_participants() is deprecated. Please use \core\table\participants_search::class with table filtersets instead. ++
* line 3182 of /lib/deprecatedlib.php: call to debugging()
* line 44 of /opt/moosh/Moosh/Command/Moodle39/Group/GroupMemberadd.php: call to user_get_participants()
* line 365 of /opt/moosh/moosh.php: call to Moosh\Command\Moodle39\Group\GroupMemberadd->execute()
++ user_get_participants_sql() is deprecated. Please use \core\table\participants_search::class with table filtersets instead. ++
* line 2944 of /lib/deprecatedlib.php: call to debugging()
* line 3185 of /lib/deprecatedlib.php: call to user_get_participants_sql()
* line 44 of /opt/moosh/Moosh/Command/Moodle39/Group/GroupMemberadd.php: call to user_get_participants()
* line 365 of /opt/moosh/moosh.php: call to Moosh\Command\Moodle39\Group\GroupMemberadd->execute()
Notice: Undefined index: email@example.com in /opt/moosh/Moosh/Command/Moodle39/Group/GroupMemberadd.php on line 58
Default exception handler: Invalid user Debug: SELECT * FROM {user} WHERE id IS NULL
[array (
)]
Error code: invaliduser
* line 1654 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
* line 1630 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 59 of /opt/moosh/Moosh/Command/Moodle39/Group/GroupMemberadd.php: call to groups_add_member()
* line 365 of /opt/moosh/moosh.php: call to Moosh\Command\Moodle39\Group\GroupMemberadd->execute()
!!! Invalid user !!!
Expected behaviour
User is added to group without errors.
Steps to reproduce
What I did was:
Add a user with user-create (username and email are the same). Note the new userid.
Look up the courseid with course-list.
Look up the groupid with group-list.
Enroll the user in the course with course-enrol.
Add the user to the group with group-memberadd.
The commands from my Bash history (some values changed for privacy):
Actual behaviour
When adding a user to a group with
userid
:When adding a user to a group with
username
:Expected behaviour
User is added to group without errors.
Steps to reproduce
What I did was:
user-create
(username
andemail
are the same). Note the newuserid
.courseid
withcourse-list
.groupid
withgroup-list
.course-enrol
.group-memberadd
.The commands from my Bash history (some values changed for privacy):
The text was updated successfully, but these errors were encountered: