Multiple audiences can be uploaded from a CSV (comma separated values) text file by an administrator if they go to Site administration > Users > Accounts > Audiences > Upload audiences from the Administration block. You can create an audience at either the site-wide (system) context or in the course category context.
Upload audience process
To upload an audience follow these steps:
- Create audience CSV text file for uploading (must include a name column with the name of each new audience on a new line).
- Go to Site administration > Users > Accounts > Audiences > Upload audiences from the Administration block.
- Add file to upload and configure the settings.
- Click the Preview button to review settings and check for any errors. If errors are reported with the file, correct as needed.
- When you are happy click Upload audiences.
- This will then display a confirmation screen, click Continue to complete the process.
|Click Choose a file.. to browse for the file you wish to upload or simply drag and drop it into the upload area.||-|
Choose which character you wish to use as a delimiter, by default this is a comma. The delimiter separates items on the same line like columns in a row. Choose from:
|Choose the character encoding you wish to use. The default is UTF-8.||-|
|Set the default context for the audience either System (site-wide) or a particular category on the site.||The default context will be used when no |
When uploading to the site the file formatting is very important to ensure a successful upload. You can use either a spreadsheet program or a plain text editor to create the file - but it must be saved as a CSV.
The file will contain a heading row of the various fields you wish to include and then a number of rows with the audience data. The delimiter that you choose will act as the column separator when the file is saved as a CSV or opened in a text editor.
Below is an example of the construction of an audience upload file using a comma as the delimiter.
There are a number of available fields, some are required and others are optional. You can see them all below.
|name||The name of the audience.|
To provide values other than the default include one or more of the following optional fields.
|contextid||If you wish to specify the context ID for the audience you are uploading, this might be the context ID of a specific course category.|
|idnumber||Assign a unique alphanumeric ID to the audience.|
|description||You can provide a description of the audience, which may guide others in using it.|
Specify the text editor formatting type you'd like to use for the description. Choose from:
You can either set the audience to:
You can use additional fields to link to information elsewhere on the system. As most of the additional fields involve looking up information from other parts of the system it is advised these are used with caution.
|context||Enter the context of the audience being uploaded for example system for a site-wide audience.|
|category||Associates the audience with a particular course category named here.|
|category_id||Associates the audience with a particular course category using that category's ID.|
|category_idnumber||Associates the audience with a particular course category using that category's ID number.|
|category_path||Associates the audience with a particular course category using that category's path.|