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: all of these are completely optional.

description, picture, hidepicture

Commas within the data should be encoded as &#44 - 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.