Note: You are currently viewing documentation for Moodle 3.6. Up-to-date documentation for the latest stable version of Moodle is likely available here: Upload users.

Talk:Upload users: Difference between revisions

From MoodleDocs
m (%-l template is inactive)
(added request for clarifiying the use of the auth field)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Notes from Moodle 2.1 uploaduser.php==
== Upload user authentication method gotcha ==
firstname, lastname, username, email, city, country, lang, timezone, mailformat, maildisplay, maildigest, htmleditor, ajax, autosubscribe ,institution, department , idnumber, skype , msn, aim, yahoo, icq, phone1, phone2, address, url, description, descriptionformat, password, auth, oldusername , deleted, course1, course2, course3, course4 
       
// watch out when changing auth type or using external auth plugins!
// use oldusername when renaming users - this is the original username
// 1 means delete user
//course# not sure about these put short course name


--[[User:chris collman|chris collman]] 21:22, 22 November 2011 (WST)
Not sure how to word this or where to highlight it, but there should be a banner warning admins that if they upload a CSV in the upload users area ''without'' an authentication column (auth) populated with the correct auth method for the users they want to update, Moodle will change the updated users to having the manual authentication type tagged to their profiles. In other words, missing column = default to manual authentication interpretation by Moodle.


==ISO Website broken link==
This then means that any integrations using that auth method to update users will not work until the auth method is put back to the correct method. (We see this most often with LDAP auth users.)
The [http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm english_country_names_and_code_elements.htm] link on the iso.org website is no longer valid. The [http://web.archive.org/web/20110721031148/http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm Web Archive] copy of that page indicates that the same info is now on [http://www.iso.org/iso/country_names_and_code_elements http://www.iso.org/iso/country_names_and_code_elements], so I'm updating the link.


--[[User:Luis de Vasconcelos|Luis de Vasconcelos]] 14:52, 13 July 2012 (WST)
Upshot: always include the auth column if this user uploads area is not your main way of creating/updating users on the site.
--Lesli Smith 1/12/2016
==Reply to Lesli==
Thanks for this useful information - I added it on the page but it would be great it you could go and check it and improve if necessary.--[[User:Mary Cooch|Mary Cooch]] ([[User talk:Mary Cooch|talk]]) 19:11, 13 January 2016 (AWST)


:Thanks Luis for your help :-) --[[User:Helen Foster|Helen Foster]] 17:34, 18 July 2012 (WST)
==Reply to Mary==
I just got caught out by this too, while assigning existing users to a cohort. I didn't see where you had added the warning.


== Role field ==
I'd recommend adding a new section between 'Password field' and 'Optional fields', just after 'Required fields', at the start of the page.


In the description of the field TYPE some id's are mentioned. Please be aware that these are not the same as you should use in the column ROLE. In ROLE you should use the ID of the roles that can be found through 'Define roles'. Can't quite figure out what TYPE is meant for.
Something along the lines of:


Note moodle 2.8: Uploading using %-l in username field got me -l as username, not the lastname in lowercase.
*'''Auth field''':
If updating an existing user make sure that you specify the authentication method required.
 
:For example, when assigning membership to a cohort , use the following syntax:
 
:<p>This retains ldap authentication:</p>
username,firstname,lastname,email,cohort1,auth
x1234567,Sam,Smith,sam.smith@abc.ac.uk,mbbs-2018,ldap
 
:<p>But this reverts the user's authentication method to 'manual':</p>
username,firstname,lastname,email,cohort1
x1234567,Sam,Smith,sam.smith@abc.ac.uk,mbbs-2018

Latest revision as of 09:25, 2 September 2016

Upload user authentication method gotcha

Not sure how to word this or where to highlight it, but there should be a banner warning admins that if they upload a CSV in the upload users area without an authentication column (auth) populated with the correct auth method for the users they want to update, Moodle will change the updated users to having the manual authentication type tagged to their profiles. In other words, missing column = default to manual authentication interpretation by Moodle.

This then means that any integrations using that auth method to update users will not work until the auth method is put back to the correct method. (We see this most often with LDAP auth users.)

Upshot: always include the auth column if this user uploads area is not your main way of creating/updating users on the site. --Lesli Smith 1/12/2016

Reply to Lesli

Thanks for this useful information - I added it on the page but it would be great it you could go and check it and improve if necessary.--Mary Cooch (talk) 19:11, 13 January 2016 (AWST)

Reply to Mary

I just got caught out by this too, while assigning existing users to a cohort. I didn't see where you had added the warning.

I'd recommend adding a new section between 'Password field' and 'Optional fields', just after 'Required fields', at the start of the page.

Something along the lines of:

  • Auth field:

If updating an existing user make sure that you specify the authentication method required.

For example, when assigning membership to a cohort , use the following syntax:

This retains ldap authentication:

username,firstname,lastname,email,cohort1,auth
x1234567,Sam,Smith,sam.smith@abc.ac.uk,mbbs-2018,ldap

But this reverts the user's authentication method to 'manual':

username,firstname,lastname,email,cohort1
x1234567,Sam,Smith,sam.smith@abc.ac.uk,mbbs-2018