User details are not getting updated via csv upload

User details are not getting updated via csv upload

by Sarath P -
Number of replies: 6

Hello everyone. I upload users via .csv file. Sometimes the users list would be 50 or more. Every time after uploading each file, I take a copy of the results.

I found that for some users, their last name has not been updated. When I check the results document, it is showing the status as ‘User updated’ and their last name has been changed, but not reflected on Moodle.

In order to make sure that there is no problem with the headers, what I did is that I uploaded the same csv only with the users were having issue. This time it worked and the user first name, last name got updated.

I was wondering if someone could help in understanding the problem and suggest a solution.

Moodle version 3.4.2+

Thanks in Advance.


Average of ratings: -
In reply to Sarath P

Re: User details are not getting updated via csv upload

by Conn Warwicker -
Picture of Core developers Picture of Plugin developers
Is this on a live moodle? If so, do they users use authentication such as LDAP/SAML/etc... which might update their account when they login? Could it be updating from the moodle upload but then being overwritten if they login to moodle again?
Average of ratings: Useful (2)
In reply to Conn Warwicker

Re: User details are not getting updated via csv upload

by Sarath P -
Hi Conn. Thanks for you response.
Yes. It is on a live Moodle. We are using OpenID connect for authentication. Do you believe this could affect the firstname, lastname of the users?
In reply to Sarath P

Re: User details are not getting updated via csv upload

by Melanie Scott -
Picture of Particularly helpful Moodlers
Not Conn, but yes, as long as the ID doesn't change, other user details that are mapped using authentication will overwrite. So, if the last name changes but isn't updated in your OpenID system yet, it will keep overwriting when they log in unless you have actively turned that off.
Average of ratings: Useful (3)
In reply to Melanie Scott

Re: User details are not getting updated via csv upload

by Sarath P -
Thanks for your response. Could you please tell me how to turn that off?
In reply to Sarath P

Re: User details are not getting updated via csv upload

by Melanie Scott -
Picture of Particularly helpful Moodlers
I really can't. I'm not a tech, we used Exchange to push ldap and I only know this much because my last job I explained to the techs what I wanted and they explained slowly, using small words how it would work. Then I had conversations with the people creating new accounts about what to put in what new account fields to ensure proper mapping which were repeated when data got updated wrong. We had several instances like yours. Not sure what my current installation uses...it hasn't been an issue. Sorry.
In reply to Sarath P

Re: User details are not getting updated via csv upload

by C Behan -
Hi Sarath and Melanie,
Thanks for sharing the problem and explanation.

Sarath - I would suggest that you have a conversation with colleagues in your organisation, because it seems to me that the e.g. surname should be updated in the source (e.g. Active Directory) rather than a CSV file upload in Moodle.

Catherine