<?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=Auto_role_assignment_block</id>
	<title>Auto role assignment block - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Auto_role_assignment_block"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Auto_role_assignment_block&amp;action=history"/>
	<updated>2026-05-06T21:44:58Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Auto_role_assignment_block&amp;diff=2015&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Auto_role_assignment_block&amp;diff=2015&amp;oldid=prev"/>
		<updated>2024-10-18T06:31:00Z</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;Версия от 06:31, 18 октября 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=Auto_role_assignment_block&amp;diff=2014&amp;oldid=prev</id>
		<title>1&gt;Nrashevskiy в 10:42, 6 января 2014</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Auto_role_assignment_block&amp;diff=2014&amp;oldid=prev"/>
		<updated>2014-01-06T10:42:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== Why this block ===&lt;br /&gt;
Consider the situation. In the course the student has role of &amp;quot;student&amp;quot;, he has permission to pass tests, viewing lectures, correspondence with other course participants, etc. When a student, for example, gives examination test it should be out some rights such as viewing the lectures and correspondence. If it is done manually, as is done now, it will take a lot of time, because group usually more than 10 people, moreover after the end of the test must return the user to the previous permission.&lt;br /&gt;
&lt;br /&gt;
This block will automatically change the user&amp;#039;s role on the events in the system (in this case the beginning of the test and the end of the test).&lt;br /&gt;
&lt;br /&gt;
=== Rules ===&lt;br /&gt;
Rule - is a term used to describe the process of checking the current state of the user and the ability to change the role by event in system.&lt;br /&gt;
&lt;br /&gt;
For the example above:&lt;br /&gt;
*Event in system: the beginning of passing the test;&lt;br /&gt;
*Current state: role of &amp;quot;student&amp;quot;;&lt;br /&gt;
*New state:  role of  &amp;quot;students taking examination test&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Rule works as follows:&lt;br /&gt;
# The system event is triggered - the student began to take the test&lt;br /&gt;
# If for this event find rule, then&lt;br /&gt;
## Check the user&amp;#039;s current role (in this case &amp;quot;student&amp;quot;), if the role needs to change (in this case &amp;quot;students taking examination test&amp;quot;), then&lt;br /&gt;
### Change user role (in this case role &amp;quot;student&amp;quot; change on role &amp;quot;student taking examination test&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Role returns of the same principle, only handling the event of the &amp;quot;student finished the test&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Parameters of rules ===&lt;br /&gt;
* &amp;#039;&amp;#039;id of the course&amp;#039;&amp;#039; - a specific course for which the rule is intended&lt;br /&gt;
* &amp;#039;&amp;#039;type rule&amp;#039;&amp;#039; -  modules of Moodle for which should work rule, now realized work rules for two types of module quiz and block supervised, planned to implement for the module poasasssignment.&lt;br /&gt;
* &amp;#039;&amp;#039;user Group&amp;#039;&amp;#039; - rule is triggered (depending on type) for:&lt;br /&gt;
** One user&lt;br /&gt;
** User groups on the course&lt;br /&gt;
** All users on the course&lt;br /&gt;
* &amp;#039;&amp;#039;allowed roles&amp;#039;&amp;#039; - roles of users who are allowed to change in the rule&lt;br /&gt;
&lt;br /&gt;
=== Rule structure ===&lt;br /&gt;
Rule changes the permissions of the user depending on the event in the system.&lt;br /&gt;
&lt;br /&gt;
Rules structure:&lt;br /&gt;
&lt;br /&gt;
Required parameters:&lt;br /&gt;
* Name of rule;&lt;br /&gt;
* Type of rule;&lt;br /&gt;
* A role that will be assigned to the user when the rule will trigger;&lt;br /&gt;
* Roles that are permitted a transition;&lt;br /&gt;
* Elements of the course for which the rule is triggered.&lt;br /&gt;
&lt;br /&gt;
Optional parameters may be added depending on the type of rule.&lt;br /&gt;
&lt;br /&gt;
=== Block appearance ===&lt;br /&gt;
The block contains three links:&lt;br /&gt;
# Link to current rules page&lt;br /&gt;
# Link to active rules page&lt;br /&gt;
# Current role of user in course&lt;br /&gt;
[[Image:block_role_assign.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Current rules page ===&lt;br /&gt;
On this page you can see rules that already exist. On this page you can go to add/edit page of rule; delete rule (if you have the necessary permissions).&lt;br /&gt;
&lt;br /&gt;
[[Image:current_rules.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Add rule page ===&lt;br /&gt;
In this page you can add new rule:&lt;br /&gt;
Step 1:&lt;br /&gt;
* you must input name of rule&lt;br /&gt;
* you must select type of rule&lt;br /&gt;
&lt;br /&gt;
click &amp;#039;next&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:new_rule.jpg]]&lt;br /&gt;
&lt;br /&gt;
Step 2:&lt;br /&gt;
* you must select &amp;#039;new role&amp;#039; (this role will receive a user when a rule is triggered)&lt;br /&gt;
* you must select &amp;#039;allow roles&amp;#039; (this user roles on this course, which allowed triggering rules)&lt;br /&gt;
* you must select elements of course for this type of rule, which rule is triggered&lt;br /&gt;
&lt;br /&gt;
click &amp;#039;save&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:add_edit_rule.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Active rules page ===&lt;br /&gt;
&lt;br /&gt;
On this page you can see active rules.&lt;br /&gt;
&lt;br /&gt;
[[Image:active_rules.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== DB structure ===&lt;br /&gt;
&lt;br /&gt;
[[Image:database.jpg]]&lt;br /&gt;
&lt;br /&gt;
* block_role_assign_rules - table for rules:&lt;br /&gt;
* block_role_assign_instances - table with active rule&lt;br /&gt;
* block_role_assign_values - table for optional parameters&lt;br /&gt;
* block_role_assign_roles - table for allow roles&lt;br /&gt;
* block_role_assign_types - table where sets type of rule&lt;br /&gt;
* block_role_assign_tasks - table with types of rule&lt;br /&gt;
&lt;br /&gt;
=== Capabilities ===&lt;br /&gt;
&lt;br /&gt;
* block/role_assign:addrule - ability add rule&lt;br /&gt;
* block/role_assign:editrule - ability edit rule&lt;br /&gt;
* block/role_assign:deleterule - ability delete rule&lt;br /&gt;
* block/role_assign:viewactiverules - ability view page &amp;quot;active rules&amp;quot;&lt;br /&gt;
* block/role_assign:viewcurrentrules - ability view page &amp;quot;current rules&amp;quot;&lt;/div&gt;</summary>
		<author><name>1&gt;Nrashevskiy</name></author>
	</entry>
</feed>