貼文的作者是 Jerry Lau

Moodle in English -> General plugins -> Merger Users updated -> Merger Users updated

Jerry Lau發表於
How can I run this using a text file instead?

for example we want to merge user "epresley@student.school.com" with/to "epresley" instead?

I have about 500+ of these and don;t want to do them one by one using the GUI.

Will the same behaviour happen if there is an error and the error is logged in the log file? What table is the log file.

Errors like:

For further reference, these results are recorded in the log id 72.
Some error occurred:

Exception thrown when merging: 'Can't find data record in database table course.".

Trace:
#0 /public/school/lms/moodle-4.5.4/lib/dml/moodle_database.php(1638): moodle_database->get_record_select()
#1 /public/school/lms/moodle-4.5.4/lib/classes/context/course.php(200): moodle_database->get_record()
#2 /public/school/lms/moodle-4.5.4/lib/classes/event/grade_item_created.php(72): core\context\course::instance()
#3 /public/school/lms/moodle-4.5.4/lib/grade/grade_item.php(570): core\event\grade_item_created::create_from_grade_item()
#4 /public/school/lms/moodle-4.5.4/lib/grade/grade_category.php(2293): grade_item->insert()
#5 /public/school/lms/moodle-4.5.4/lib/grade/grade_category.php(2264): grade_category->get_grade_item()
#6 /public/school/lms/moodle-4.5.4/lib/grade/grade_category.php(241): grade_category->load_grade_item()
#7 /public/school/lms/moodle-4.5.4/lib/grade/grade_category.php(422): grade_category->update()
#8 /public/school/lms/moodle-4.5.4/lib/grade/grade_category.php(2509): grade_category->insert_course_category()
#9 /public/school/lms/moodle-4.5.4/lib/grade/grade_item.php(1237): grade_category::fetch_course_category()
#10 /public/school/lms/moodle-4.5.4/mod/subcourse/locallib.php(95): grade_item::fetch_course_item()
#11 /public/school/lms/moodle-4.5.4/mod/subcourse/lib.php(436): subcourse_fetch_refgrades()
#12 /public/school/lms/moodle-4.5.4/lib/gradelib.php(1423): subcourse_update_grades()
#13 /public/school/lms/moodle-4.5.4/admin/tool/mergeusers/lib/mergeusertool.php(475): grade_update_mod_grades()
#14 /public/school/lms/moodle-4.5.4/admin/tool/mergeusers/lib/mergeusertool.php(274): MergeUserTool->updateGrades()
#15 /public/school/lms/moodle-4.5.4/admin/tool/mergeusers/lib/mergeusertool.php(192): MergeUserTool->_merge()
#16 /public/school/lms/moodle-4.5.4/admin/tool/mergeusers/index.php(136): MergeUserTool->merge()
#17 {main}

Started merging at Tuesday, 14 October 2025, 11:08 AM
Merge took 18 seconds

Merge failed! Your database engine supports transactions. Therefore, the whole current transaction has been rolled back and no modification has been made to your database.

Would it do the same behaviour (i.e rolled back) and logged as if it is done via the GUI?

where can we do it via CSV file as I cannot find documentation for that.

Thanks

Dave

Greetings,

We are planning to remove SAML and use OIDC exclusively on moodle 4.1 (soon to be 4.5) with MS Block version 4.1.10

I thought this would be easy because it is just a matter of updating the few users on saml to oidc, turning off saml and it would now just use oidc exclusively.

I did a test for a couple of users and it seems fine.

So I thought, great, lets just turn off/hide saml and just to be safe put (place it) SAML below oidc in the authentication sequence. and we're good to go.

However a number of users are unable to login even though their account is in Moodle and with "oidc" as their authentication!

So I thought, turn it back on and this error message came up which I never saw before:

Invalid Login: An existing account on this Moodle has the same email address as the account you are trying to create and "Allow accounts with same email" (allowaccountssameemail) setting is disabled. 

First of all it is not a new account and the user has logged in before and

That setting is in the Manage Authentication and is unchecked (disabled).

However, we noticed that by moving up SAML above OIDC, THEY are not ABLE TO login even though that user's authentication type is "oidc".

What the heck is going on?

Why does it look like it still depends on SAML for oidc? 

Also when a new user logs in and IS NOT IN MOODLE, it would automatically be created through oidc login.

We are using Microsoft Entra ID. In the OIDC, Binding Username Claim (auth_oidc | bindingusernameclaim) setting, what did you set it as? Ours is chose automatically.

image.png

In the Microsoft 365 Integration what is your SYNC SETTING SO the tasks of sync users will work also and also with OneDrive?

image%20%281%29.png

thanks

Dave

評比平均分數: -
so what is the argument or business case for this and is "leadership" or security peeps okay with your request? Trying to think when this can be used and in which scenarios. Our security team is pretty darn good and we don't want to ever compromise that standard. Its so good that our external security provider we hired to try and hack it were unable to and they said its better than gov't security. So good that we have to ease off some policies so they can drill down further ..