Import groups: Difference between revisions
Helen Foster (talk | contribs) m (group/import moved to Import groups) |
Helen Foster (talk | contribs) (adding info from uploadgroups help file, categories, location) |
||
Line 1: | Line 1: | ||
{{Moodle 2.0}}Location: Import groups button in ''Settings > Course administration > Users > Groups'' | |||
Groups import provides a simple, easy way to create groups from a spreadsheet (CSV). | Groups import provides a simple, easy way to create groups from a spreadsheet (CSV). | ||
The CSV file has just one required | The CSV file has just one required fieldname (groupname), but can include default and/or optional fieldnames | ||
* Each line of the file contains one record | |||
* Each record is a series of data separated by commas | |||
* The first record of the file is special, and contains a list of fieldnames. This defines the format of the rest of the file. | |||
'''Required fieldnames''' - These fields must be included in the first record, and defined for each user | |||
groupname | |||
'''Default fieldnames''' - These are optional - if they are not included then the values are taken from the current language and current course | |||
idnumber, coursename, lang | |||
'''Optional fieldnames''' | |||
description, enrolmentkey, picture, hidepicture | |||
*Commas within the data should be encoded as , - the script will automatically decode these back to commas. | |||
*For Boolean fields, use 0 for false and 1 for true. | |||
*Either idnumber or coursename can be used to identify the course. Idnumber overrides coursename. If neither is specified, the groups will be added to the current course. | |||
*Coursename is the course shortname. | |||
Note: If a group is already registered in the Moodle database for a particular course, this script will return the group name for that group. Teachers are only allowed to upload groups in courses they are authorized to edit. | |||
Line 13: | Line 41: | ||
</pre> | </pre> | ||
Note that | |||
Note that groups import doesn't currently handle anything to do with [[Groupings]]. | |||
[[Category:Groups]] |
Revision as of 09:04, 3 February 2011
Template:Moodle 2.0Location: Import groups button in Settings > Course administration > Users > Groups
Groups import provides a simple, easy way to create groups from a spreadsheet (CSV).
The CSV file has just one required fieldname (groupname), but can include default and/or optional fieldnames
- Each line of the file contains one record
- Each record is a series of data separated by commas
- The first record of the file is special, and contains a list of fieldnames. This defines the format of the rest of the file.
Required fieldnames - These fields must be included in the first record, and defined for each user
groupname
Default fieldnames - These are optional - if they are not included then the values are taken from the current language and current course
idnumber, coursename, lang
Optional fieldnames
description, enrolmentkey, picture, hidepicture
- Commas within the data should be encoded as , - the script will automatically decode these back to commas.
- For Boolean fields, use 0 for false and 1 for true.
- Either idnumber or coursename can be used to identify the course. Idnumber overrides coursename. If neither is specified, the groups will be added to the current course.
- Coursename is the course shortname.
Note: If a group is already registered in the Moodle database for a particular course, this script will return the group name for that group. Teachers are only allowed to upload groups in courses they are authorized to edit.
A sample file looks like this:
groupname, description, enrolmentkey Team 1, Group Assignment Team 1, orange Team 2, Group Assignment Team 2, purple Team 3, Group Assignment Team 3, green
Note that groups import doesn't currently handle anything to do with Groupings.