<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Development%3ACohorts</id>
	<title>Development:Cohorts - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Development%3ACohorts"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:Cohorts&amp;action=history"/>
	<updated>2026-05-07T06:00:30Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Development:Cohorts&amp;diff=10918&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:Cohorts&amp;diff=10918&amp;oldid=prev"/>
		<updated>2024-10-21T08:51:05Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 08:51, 21 октября 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Олег Давидович</name></author>
	</entry>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Development:Cohorts&amp;diff=10917&amp;oldid=prev</id>
		<title>1&gt;Mudrd8mz: Text replacement - &quot;class=&quot;nicetable&quot;&quot; to &quot;class=&quot;wikitable&quot;&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:Cohorts&amp;diff=10917&amp;oldid=prev"/>
		<updated>2021-07-14T13:24:22Z</updated>

		<summary type="html">&lt;p&gt;Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Work in progress}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = Cohorts&lt;br /&gt;
|state = Work in progress&lt;br /&gt;
|tracker = MDL-21781&lt;br /&gt;
|discussion = n/a&lt;br /&gt;
|assignee = [[User:Petr Škoda (škoďák)|Petr Škoda (škoďák)]]&lt;br /&gt;
}}&lt;br /&gt;
{{Moodle 2.0}}&lt;br /&gt;
&lt;br /&gt;
=Goals=&lt;br /&gt;
Site-wide groups (aka cohorts) is one of the most requested missing features.&lt;br /&gt;
# Simplify manual enrolments - instead of enrolling students one by one, it would be possible to enrol a cohort with single click.&lt;br /&gt;
# Cohort enrolment plugin - new enrolment plugin synchronising users in cohort with enrolments in a course (including role assignment and group membership)&lt;br /&gt;
# 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.&lt;br /&gt;
# Partially replace meta courses&lt;br /&gt;
# Replace category enrolments - category enrolments have major design issues and are not compatible with incomming enrolment changes.&lt;br /&gt;
&lt;br /&gt;
=DB tables=&lt;br /&gt;
&lt;br /&gt;
Table &amp;#039;&amp;#039;cohort&amp;#039;&amp;#039; definition of site-wide groups (aka cohorts)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
| int(10)&lt;br /&gt;
| auto-incrementing&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;contextid&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| foreign key, references context.id&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| char(254)&lt;br /&gt;
| &lt;br /&gt;
| human readable cohort name&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;idnumber&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| char(100)&lt;br /&gt;
| &lt;br /&gt;
| unique identifier of the cohort, can be used in external systems&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text&lt;br /&gt;
| &lt;br /&gt;
| longer description&lt;br /&gt;
|-&lt;br /&gt;
| descriptionformat&lt;br /&gt;
| int(2)&lt;br /&gt;
| &lt;br /&gt;
| text format&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| char(100)&lt;br /&gt;
| &lt;br /&gt;
| component name of a plugin responsible for assignment of users (ex: auth_ldap, etc.), NULL means manual assignments&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| timestamp, creation date&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| timestamp, last modification&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Context specified can be system or course category level, defining of cohort a course context would not make much sense.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Table &amp;#039;&amp;#039;cohort_members&amp;#039;&amp;#039; stores cohort members&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Default&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
| int(10)&lt;br /&gt;
| auto-incrementing&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;cohortid&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
| int(10)&lt;br /&gt;
|&lt;br /&gt;
| foreign key, references cohort.id&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;userid&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| foreign key, references user.id&lt;br /&gt;
|-&lt;br /&gt;
| timeadded&lt;br /&gt;
| int(10)&lt;br /&gt;
| &lt;br /&gt;
| timestamp, when added&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=New capabilities=&lt;br /&gt;
* moodle/cohort:assign - add/delete members (only for manual assignment cohorts with source == null)&lt;br /&gt;
* moodle/cohort:manage  -add/delete/move cohorts&lt;br /&gt;
* moodle/cohort:view - view membership and use cohort elsewhere&lt;br /&gt;
&lt;br /&gt;
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 cohorts).&lt;br /&gt;
&lt;br /&gt;
=User interface=&lt;br /&gt;
# Cohort edit link in CONTEXT_SYSTEM and each CONTEXT_COURSECAT- most probably from the settings block&lt;br /&gt;
# Option for manual cohort enrolment - part of new enrolment UI&lt;br /&gt;
# New UI in cohort enrolment plugin&lt;br /&gt;
# New options in group creation UI&lt;br /&gt;
# New options for sync with external groups in auth or enrol plugins&lt;br /&gt;
&lt;br /&gt;
=Implementation steps=&lt;br /&gt;
# add db tables and cohort membership UI&lt;br /&gt;
# add option to assign role to all cohort users (one time only, no sync)&lt;br /&gt;
# enrolment rewrite&lt;br /&gt;
# cohort enrolment plugin&lt;br /&gt;
&lt;br /&gt;
=Upgrade=&lt;br /&gt;
&lt;br /&gt;
Cohorts are designed to replace course category enrolments because the new enrolment plugin is not compatible with this.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
* [[Obsolete:Enrolment rewrite and role tweaks proposal]]&lt;br /&gt;
* [[Development:New permissions evaluation in 2.0]]&lt;br /&gt;
* [[Development:New permission overriding UI]]&lt;br /&gt;
* [[Development:New enrolments in 2.0]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Roles]]&lt;/div&gt;</summary>
		<author><name>1&gt;Mudrd8mz</name></author>
	</entry>
</feed>