From d526725b8d24198b650877795dc59b28397b0bf3 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Mon, 27 Aug 2007 07:24:35 +0000 Subject: [PATCH] MDL-10181, help files should not be modified, a new file has been created --- admin/uploaduser.php | 2 +- lang/en_utf8/help/uploadusers.html | 143 ++++++++++++---------------- lang/en_utf8/help/uploadusers2.html | 81 ++++++++++++++++ 3 files changed, 144 insertions(+), 82 deletions(-) create mode 100755 lang/en_utf8/help/uploadusers2.html diff --git a/admin/uploaduser.php b/admin/uploaduser.php index bbaab07be6a..5ec3dcf6661 100755 --- a/admin/uploaduser.php +++ b/admin/uploaduser.php @@ -407,7 +407,7 @@ if ( $formdata = $mform->get_data() ) { } /// Print the form -print_heading_with_help(get_string('uploadusers'), 'uploadusers'); +print_heading_with_help(get_string('uploadusers'), 'uploadusers2'); $mform->display(); admin_externalpage_print_footer(); ?> diff --git a/lang/en_utf8/help/uploadusers.html b/lang/en_utf8/help/uploadusers.html index 4d091abadf0..f173a733054 100644 --- a/lang/en_utf8/help/uploadusers.html +++ b/lang/en_utf8/help/uploadusers.html @@ -1,81 +1,62 @@ -

Upload users

- -

Firstly, note that it is usually not necessary to import users in bulk - to keep your own maintenance work down you should first explore forms of authentication that do not require manual maintenance, such as connecting to existing external databases or letting the users create their own accounts. See the Authentication section in the admin menus.

-

If you are sure you want to import multiple user accounts from a text file, then you need to format your text file as follows:

- - -

Here is an example of a valid import file:

-

username, password, firstname, lastname, email, lang, idnumber, maildisplay, course1, group1, type1
-jonest, verysecret, Tom, Jones, jonest@someplace.edu, en, 3663737, 1, Intro101, Section 1, 1
-reznort, somesecret, Trent, Reznor, reznort@someplace.edu, en_us, 6736733, 0, Advanced202, Section 3, 3 -

-

The CSV file may contain full informations for some users and use default values for others (use extra commas to corectly associate data to headers). For example, the following file will use default values for username, city and country for user Trent Reznor:

-

username, password, firstname, lastname, country, city
-jonest, verysecret, Tom, Jones, RO, Constanta
-, somesecret, Trent, Reznor, , -

- -

Templates

-

The default values are processed as templates in which the following codes are allowed:

- -

Between the percent sign (%) and any code letter (l, f or u) the following modifiers are allowed:

- - -

For example, if the firstname is John and the lastname is Doe, the following values will be obtained with the specified templates:

- -

Template processing is done only on default values, and not on the values retrieved from the CSV file.

-

In order to create corect Moodle usernames, the username is always converted to lowercase. Moreover, if the "Allow extended characters in usernames" option in the Site policies page is off, characters different to letters, digits, dash (-) and dot (.) are removed. -For example if the firstname is John Jr. and the lastname is Doe, the username %-f_%-l will produce john jr._doe when Allow extended characters in usernames is on, and johnjr.doe when off.

-

When the "New username duplicate handling" setting is set to Append counter, an auto-increment counter will be append to duplicate usernames produced by the template. -For example, if the CSV file contains the users named John Doe, Jane Doe and Jenny Doe without explicit usernames, the default username is %-1f%-l and New username duplicate handling is set to Append counter, then the usernames produced will be jdoe, jdoe2 and jdoe3. -

- -

Updating existing accounts

- -

By default Moodle assumes that you will be creating new user accounts, and skips records where the username matches an existing account. However, if you set "Update existing accounts" to Yes, the existing user account will be updated.

- -

When updating existing accounts you can change usernames as well. Set "Allow renames" to Yes and include in your file a field called oldusername.

- -

Warning: any errors updating existing accounts can affect your users badly. Be careful when using the options to update.

- -

Deleting accounts

-

If the deleted field is present, users with value 1 for it will be deleted. In this case, all the fields may be omitted, except for username (which should be present in the CSV file, or a default value for it should be available).

-

Deleting and uploading accounts could be done with a single CSV file. For example, the following file will add the user Tom Jones and delete the user reznort:

-

username, firstname, lastname, deleted
-jonest, Tom, Jones, 0
-reznort, , , 1 -

+

Upload users

+ +

Firstly, note that it is usually not necessary to import users in bulk +- to keep your own maintenance work down you should first explore forms +of authentication that do not require manual maintenance, such as +connecting to existing external databases or letting the users create +their own accounts. See the Authentication section in the admin menus.

+

If you are sure you want to import multiple user accounts from a text file, then you need to format your text file as follows:

+ + + + +

Here is an example of a valid import file:

+

username, password, firstname, lastname, email, lang, idnumber, maildisplay, course1, group1, type1
+jonest, verysecret, Tom, Jones, jonest@someplace.edu, en, 3663737, 1, Intro101, Section 1, 1
+reznort, somesecret, Trent, Reznor, reznort@someplace.edu, en_us, 6736733, 0, Advanced202, Section 3, 3 +

+ +

Updating existing accounts

+ +

By default Moodle assumes that you will be creating new user +accounts, and skips records where the username matches an existing +account. However, if you set "Update existing accounts" to Yes, the existing user account will be updated.

+ +

When updating existing accounts you can change usernames as well. Set "Allow renames" to Yes and include in your file a field called oldusername.

+ +

Warning: any errors updating existing accounts can affect your users badly. Be careful when using the options to update.

+ \ No newline at end of file diff --git a/lang/en_utf8/help/uploadusers2.html b/lang/en_utf8/help/uploadusers2.html new file mode 100755 index 00000000000..4d091abadf0 --- /dev/null +++ b/lang/en_utf8/help/uploadusers2.html @@ -0,0 +1,81 @@ +

Upload users

+ +

Firstly, note that it is usually not necessary to import users in bulk - to keep your own maintenance work down you should first explore forms of authentication that do not require manual maintenance, such as connecting to existing external databases or letting the users create their own accounts. See the Authentication section in the admin menus.

+

If you are sure you want to import multiple user accounts from a text file, then you need to format your text file as follows:

+ + +

Here is an example of a valid import file:

+

username, password, firstname, lastname, email, lang, idnumber, maildisplay, course1, group1, type1
+jonest, verysecret, Tom, Jones, jonest@someplace.edu, en, 3663737, 1, Intro101, Section 1, 1
+reznort, somesecret, Trent, Reznor, reznort@someplace.edu, en_us, 6736733, 0, Advanced202, Section 3, 3 +

+

The CSV file may contain full informations for some users and use default values for others (use extra commas to corectly associate data to headers). For example, the following file will use default values for username, city and country for user Trent Reznor:

+

username, password, firstname, lastname, country, city
+jonest, verysecret, Tom, Jones, RO, Constanta
+, somesecret, Trent, Reznor, , +

+ +

Templates

+

The default values are processed as templates in which the following codes are allowed:

+ +

Between the percent sign (%) and any code letter (l, f or u) the following modifiers are allowed:

+ + +

For example, if the firstname is John and the lastname is Doe, the following values will be obtained with the specified templates:

+ +

Template processing is done only on default values, and not on the values retrieved from the CSV file.

+

In order to create corect Moodle usernames, the username is always converted to lowercase. Moreover, if the "Allow extended characters in usernames" option in the Site policies page is off, characters different to letters, digits, dash (-) and dot (.) are removed. +For example if the firstname is John Jr. and the lastname is Doe, the username %-f_%-l will produce john jr._doe when Allow extended characters in usernames is on, and johnjr.doe when off.

+

When the "New username duplicate handling" setting is set to Append counter, an auto-increment counter will be append to duplicate usernames produced by the template. +For example, if the CSV file contains the users named John Doe, Jane Doe and Jenny Doe without explicit usernames, the default username is %-1f%-l and New username duplicate handling is set to Append counter, then the usernames produced will be jdoe, jdoe2 and jdoe3. +

+ +

Updating existing accounts

+ +

By default Moodle assumes that you will be creating new user accounts, and skips records where the username matches an existing account. However, if you set "Update existing accounts" to Yes, the existing user account will be updated.

+ +

When updating existing accounts you can change usernames as well. Set "Allow renames" to Yes and include in your file a field called oldusername.

+ +

Warning: any errors updating existing accounts can affect your users badly. Be careful when using the options to update.

+ +

Deleting accounts

+

If the deleted field is present, users with value 1 for it will be deleted. In this case, all the fields may be omitted, except for username (which should be present in the CSV file, or a default value for it should be available).

+

Deleting and uploading accounts could be done with a single CSV file. For example, the following file will add the user Tom Jones and delete the user reznort:

+

username, firstname, lastname, deleted
+jonest, Tom, Jones, 0
+reznort, , , 1 +