Development:Cohorts: Difference between revisions
Line 35: | Line 35: | ||
| int(10) | | int(10) | ||
| | | | ||
| foreign key, references context.id | | foreign key, references context.id | ||
|- | |- | ||
| name | | name |
Revision as of 17:48, 8 March 2010
Note: This article is a work in progress. Please use the page comments or an appropriate moodle.org forum for any recommendations/suggestions for improvement.
Cohorts | |
---|---|
Project state | Proposal |
Tracker issue | MDL-21781 |
Discussion | n/a |
Assignee | Petr Škoda (škoďák) |
Moodle 2.0
Goals
Site-wide groups (aka cohorts) is one of the most requested missing features.
- Simplify manual enrolments - instead of enrolling students one by one, it would be possible to enrol a cohort with single click.
- Cohort enrolment plugin - new enrolment plugin synchronising users in cohort with enrolments in a course (including role assignment and group membership)
- Synchronisation with external systems - some external systems do not know the actual courses, they only contain some user groups, at present we do not have a simple way to reuse these groups in Moodle.
- Partially replace meta courses - metacourse is a confusing concept for many people, there are several unsolved problems and performance issues.
- Partially replace category enrolments - category enrolments have major design issues and are not compatible with proposed enrolment changes.
DB tables
Table cohort definition of site-wide groups (aka cohorts)
Field | Type | Default | Description |
---|---|---|---|
id | int(10) | auto-incrementing | |
contextid | int(10) | foreign key, references context.id | |
name | char(255) | name of cohort | |
description | text | longer description | |
timecreated | int(10) | timestamp, creation date | |
timemodified | int(10) | timestamp, last modification |
Context specified can be system or course category level, defining of cohort a course context would not make much sense.
Table cohort_members stores cohort members
Field | Type | Default | Description |
---|---|---|---|
id | int(10) | auto-incrementing | |
cohortid | int(10) | foreign key, references cohort.id | |
userid | int(10) | foreign key, references user.id | |
timeadded | int(10) | timestamp, when added |
New capabilities
- moodle/cohort:assign (add/delete members)
- moodle/cohort:manage (add/delete/move cohorts)
- moodle/cohort:view (view membership and use cohort elsewhere)
Context id defined in cohort table is used for access control only, the cohort may be actually used in any context (this may happen when moving courses, categories or the cohorts).