Note: You are currently viewing documentation for Moodle 3.11. Up-to-date documentation for the latest stable version of Moodle may be available here: Cohorts.

Cohorts: Difference between revisions

From MoodleDocs
(updated screenshot)
m (clean up, typos fixed: Therefore → Therefore,)
 
(28 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Grouping users}}
{{Grouping users}}
Cohorts are site-wide or category-wide groups. Cohorts enable all members of a cohort to be enrolled in a course in one action, either manually or synchronised automatically
==About cohorts==
Cohorts are site-wide or course category-wide groups. The purpose of cohorts is to enable all members of the cohort to be easily enrolled in a course. This can be done using [[Cohort sync]], which, as the name suggests, synchronises cohort membership with course enrolment. Alternatively, a cohort can be manually enrolled in a course.
 
{{MediaPlayer | url = https://youtu.be/ok27wqDAsEk | desc = How to create and add cohorts}}
 
==Creating a cohort==
==Creating a cohort==


Cohorts can be created by site administrators and other users with appropriate permissions.
Cohorts can be created by site administrators and other users with appropriate permissions.


* Access ''Administration > Site administration > Users > Accounts > Cohorts''
1.  Access ''Administration > Site administration > Users > Accounts > Cohorts''
 
[[File:Createcohort1.png|thumb|center|400px]]
[[File:Createcohort1.png|thumb|center|400px]]
* Click the Add button
2. Click the Add button. Note that in the dropdown you can choose between making your cohort available throughout the site "system" or in a named course category.
*'''NOTE''' In the dropdown you can choose between making your cohort available throughout the site "system" or in a named category.
 
*Cohorts are visible to teachers by default but unchecking the 'Visible' link will mean they are not available for teachers to use in their courses.
3. Cohorts are visible to teachers by default but unchecking the 'Visible' link will mean they are not available for teachers to use in their courses.  
*Complete the details and save the changes.
 
* Follow the assign link opposite the cohort name in the list of available cohorts.
4. Complete the details and save the changes.
 
5. Follow the assign link opposite the cohort name in the list of available cohorts.
 
[[File:cohortscreen.png|thumb|center|600px]]
[[File:cohortscreen.png|thumb|center|600px]]
* Select potential users from the list then click the Add button.
6. Select potential users from the list then click the Add button.


To synchronise cohort members with course participants, the [[Cohort sync]] enrolment plugin should be enabled in ''Administration > Site administration > Plugins > Enrolments > Manage enrol plugins''.
==Creating cohorts in bulk==


==Creating cohorts in bulk==
#Cohorts can be created with a csv file upload to the system or to a named category from ''Site administration > Users > Accounts > Cohorts > Upload cohorts''. More detailed information can be found on the [[Upload cohorts]] page. 
{{New features}}
#Cohorts can be created with a csv file upload to the system or to a named category from ''Site administration>Users>Accounts>Cohorts>Upload cohorts''
#Category managers can upload csv files to create cohorts from the Cohorts link in the Administration block of their category.  
#Category managers can upload csv files to create cohorts from the Cohorts link in the Administration block of their category.  
#An example file is below. The 'Students 2014-15' cohort will be created in the system and the 'History' cohort will be created in the (already existing) Humanities category:
#An example file is below. The 'Students 2014-15' cohort will be created in the system and the 'History' cohort will be created in the (already existing) Humanities category:
Line 35: Line 40:
==Uploading users to a cohort==
==Uploading users to a cohort==


An administrator can [[Upload users|upload users]] via CSV file to existing cohorts as follows:
An administrator can [[upload users]] via CSV file to existing cohorts as follows:
#Access ''Administration > Site administration > Users > Accounts > Upload users''
#Access ''Administration > Site administration > Users > Accounts > Upload users''
#Upload a text file with the following format:
#Upload a text file with the following format:


  username,password,firstname,lastname,email, cohort1
  username,password,firstname,lastname,email,cohort1
  tomjones,Pass1234*,Tom,Jones,tomjones@example.com, year3
  tomjones,Pass1234*,Tom,Jones,tomjones@example.com,year3
  marysmith,Pass1234*,Mary,Smith,marysmith@example.com, year4
  marysmith,Pass1234*,Mary,Smith,marysmith@example.com,year4


where year3 and year4 are the '''cohort ids''' of existing cohorts (i.e. ''not their names'').
where year3 and year4 are the '''cohort ids''' of existing cohorts (i.e. ''not their names'').
{{New features}}


''Note: If the users already exist on the system, then you only need their username with the chosen cohort in your csv file.''
''Note: If the users already exist on the system, then you only need their username with the chosen cohort in your csv file.''
Line 50: Line 54:
It is also possible to create the cohort at the same time as the users are uploaded to the system.
It is also possible to create the cohort at the same time as the users are uploaded to the system.
  username,password, firstname,lastname,email,cohort1
  username,password, firstname,lastname,email,cohort1
  jackbrown,Pass5678,Jack,Brown,jbrown@example.com,London Contingent
  jackbrown,Pass5678,Jack,Brown,jbrown@example.com,"London Contingent"
In the above example, the cohort named London Contingent will be created upon upload of the csv file.
 
In the above example, the cohort named London Contingent with and id of London Contingent will be created upon upload of the csv file.
 
'''WARNING: The upload file works on the cohort '''ID''' not the cohort name.'''
 
Therefore, if you have manually created a cohort with a name but left the ID blank, and you then try to add users into this cohort using the upload file, there will be problems. If you use the Cohort name as the value in the cohort column in the upload file, then the upload process will create a SECOND cohort with the same name as the one you already have with an ID the same as the name.
 
Example:
* You have manually created a Cohort named "Cohort A" with the ID left blank
* Your upload file tries to put users into cohort1 with a value of "Cohort A"
* Since no cohort by this ID exist, the upload will create a new cohort with the name and ID of "Cohort A"
* And there will appear two cohorts with the same name, but one with a blank id, and the users in your upload file will be in the newly created one with the id of "Cohort A" instead of the already existing one, as intended.
 
That is probably not what you want, so be careful to avoid this situation. And the easiest way to do that is to always give your Cohorts an ID and not leave it blank.


==Searching cohorts==
==Searching cohorts==
Line 57: Line 74:
cohorts.  
cohorts.  


{{New features}}
An All Cohorts screen accessed from ''Site administration > Users > Accounts > Cohorts'' allows an administrator to view and search through system and category cohorts.
 
An All Cohorts screen accessed from ''Site administration>Users>Accounts>Cohorts'' allows an administrator to view and search through system and category cohorts.


[[File:AllCohortsscreen.png|thumb|center|600px]]
[[File:AllCohortsscreen.png|thumb|center|600px]]


==Managing category cohorts==
==Managing category cohorts==
Cohorts which have been created for a category rather than the system can be located by selecting the appropriate category and then clicking the ''Cohorts'' link in ''Administration>Category (name)>Cohorts''
 
Cohorts which have been created for a category rather than the system can be located by selecting the appropriate category and then clicking the ''Cohorts'' link in ''Administration > Category (name) > Cohorts''.


==Cohort capabilities==
==Cohort capabilities==
Line 72: Line 88:
*[[Capabilities/enrol/cohort:config|Configure cohort instances]]
*[[Capabilities/enrol/cohort:config|Configure cohort instances]]
*[[Capabilities/moodle/cohort:view|View site-wide cohorts]]
*[[Capabilities/moodle/cohort:view|View site-wide cohorts]]
==Enrolling a cohort in a course==
There are two ways to enrol a cohort in a course:
# Cohort sync
# Manual enrolment of the cohort
With cohort sync, if users are later added or removed from the cohort, they are automatically enrolled or unenrolled from the course. For further details, see [[Cohort sync]].
Manual enrolment of the cohort however is a one-time action. Adding or removing users from the cohort later has no effect on course enrolment.
===Manual enrolment of a cohort===
To manually enrol all members of a cohort in a course:
# Go to ''Course administration > Enrolled users''
# Click the 'Enrol users' button and then 'Browse cohorts'
# Select a cohort then click the 'Finish enrolling users' button.
[[File:newcohortenrol.png|thumb|center|400px]]
The required capabilities for manually enrolling cohort members are:
* enrol/manual:enrol in course context
* moodle/course:enrolreview in course context
The default "Teacher" (editingteacher) role has all of these capabilities.
==Assigning user-context roles to all cohort members==
A user-context role may be assigned to all members of a cohort in ''Site administration > Users > Permissions > Assign user roles to cohort''.
This is useful for enabling mentors (or team managers) to review users' learning plans when using [[Competencies]].
{{Note|The changes may not appear immediately as the  role is assigned after a scheduled task, 'Sync cohort role assignments', is run.}}


==See also==
==See also==


*[[Cohort sync]] enrolment method
*[[Cohort sync]] enrolment method
*[[Cohort enroller]] role
*[[cohort/upload|Upload cohorts]] bulk file uploads
*MDL-34189 Make category cohorts visible site-wide for site administrators
*[http://www.youtube.com/watch?v=FMWZW_n0eVI A three minute Cohort in Moodle 2.0 video]
*[http://www.youtube.com/watch?v=dMqaeOGXuHQ Cohorts in Moodle 2.0 video]
*[http://www.somerandomthoughts.com/blog/2011/11/22/using-cohorts-with-moodle-2-2/ Using cohorts with Moodle 2.2] blog entry by Gavin Henrick


[[Category:Site administration]]
[[Category:Site administration]]

Latest revision as of 16:47, 10 March 2022

About cohorts

Cohorts are site-wide or course category-wide groups. The purpose of cohorts is to enable all members of the cohort to be easily enrolled in a course. This can be done using Cohort sync, which, as the name suggests, synchronises cohort membership with course enrolment. Alternatively, a cohort can be manually enrolled in a course.

How to create and add cohorts

Creating a cohort

Cohorts can be created by site administrators and other users with appropriate permissions.

1. Access Administration > Site administration > Users > Accounts > Cohorts

Createcohort1.png

2. Click the Add button. Note that in the dropdown you can choose between making your cohort available throughout the site "system" or in a named course category.

3. Cohorts are visible to teachers by default but unchecking the 'Visible' link will mean they are not available for teachers to use in their courses.

4. Complete the details and save the changes.

5. Follow the assign link opposite the cohort name in the list of available cohorts.

cohortscreen.png

6. Select potential users from the list then click the Add button.

Creating cohorts in bulk

  1. Cohorts can be created with a csv file upload to the system or to a named category from Site administration > Users > Accounts > Cohorts > Upload cohorts. More detailed information can be found on the Upload cohorts page.
  2. Category managers can upload csv files to create cohorts from the Cohorts link in the Administration block of their category.
  3. An example file is below. The 'Students 2014-15' cohort will be created in the system and the 'History' cohort will be created in the (already existing) Humanities category:
cohortupload.png

Adding users to a cohort in bulk

  1. Access Administration > Site administration > Users > Accounts > Bulk user actions
  2. Find users by setting an appropriate filter
  3. Add users from the available list to the selected list
  4. Choose 'Add to cohort' with selected users

Uploading users to a cohort

An administrator can upload users via CSV file to existing cohorts as follows:

  1. Access Administration > Site administration > Users > Accounts > Upload users
  2. Upload a text file with the following format:
username,password,firstname,lastname,email,cohort1
tomjones,Pass1234*,Tom,Jones,tomjones@example.com,year3
marysmith,Pass1234*,Mary,Smith,marysmith@example.com,year4

where year3 and year4 are the cohort ids of existing cohorts (i.e. not their names).

Note: If the users already exist on the system, then you only need their username with the chosen cohort in your csv file.

It is also possible to create the cohort at the same time as the users are uploaded to the system.

username,password, firstname,lastname,email,cohort1
jackbrown,Pass5678,Jack,Brown,jbrown@example.com,"London Contingent"

In the above example, the cohort named London Contingent with and id of London Contingent will be created upon upload of the csv file.

WARNING: The upload file works on the cohort ID not the cohort name.

Therefore, if you have manually created a cohort with a name but left the ID blank, and you then try to add users into this cohort using the upload file, there will be problems. If you use the Cohort name as the value in the cohort column in the upload file, then the upload process will create a SECOND cohort with the same name as the one you already have with an ID the same as the name.

Example:

  • You have manually created a Cohort named "Cohort A" with the ID left blank
  • Your upload file tries to put users into cohort1 with a value of "Cohort A"
  • Since no cohort by this ID exist, the upload will create a new cohort with the name and ID of "Cohort A"
  • And there will appear two cohorts with the same name, but one with a blank id, and the users in your upload file will be in the newly created one with the id of "Cohort A" instead of the already existing one, as intended.

That is probably not what you want, so be careful to avoid this situation. And the easiest way to do that is to always give your Cohorts an ID and not leave it blank.

Searching cohorts

When a site has a large number of cohorts, keywords may be entered into the Search Cohorts box to search for or filter the available cohorts.

An All Cohorts screen accessed from Site administration > Users > Accounts > Cohorts allows an administrator to view and search through system and category cohorts.

AllCohortsscreen.png

Managing category cohorts

Cohorts which have been created for a category rather than the system can be located by selecting the appropriate category and then clicking the Cohorts link in Administration > Category (name) > Cohorts.

Cohort capabilities

Enrolling a cohort in a course

There are two ways to enrol a cohort in a course:

  1. Cohort sync
  2. Manual enrolment of the cohort

With cohort sync, if users are later added or removed from the cohort, they are automatically enrolled or unenrolled from the course. For further details, see Cohort sync.

Manual enrolment of the cohort however is a one-time action. Adding or removing users from the cohort later has no effect on course enrolment.

Manual enrolment of a cohort

To manually enrol all members of a cohort in a course:

  1. Go to Course administration > Enrolled users
  2. Click the 'Enrol users' button and then 'Browse cohorts'
  3. Select a cohort then click the 'Finish enrolling users' button.
newcohortenrol.png

The required capabilities for manually enrolling cohort members are:

  • enrol/manual:enrol in course context
  • moodle/course:enrolreview in course context

The default "Teacher" (editingteacher) role has all of these capabilities.

Assigning user-context roles to all cohort members

A user-context role may be assigned to all members of a cohort in Site administration > Users > Permissions > Assign user roles to cohort.

This is useful for enabling mentors (or team managers) to review users' learning plans when using Competencies.

Note: The changes may not appear immediately as the role is assigned after a scheduled task, 'Sync cohort role assignments', is run.


See also