
| Key: |
MDL-8312
|
| Type: |
Improvement
|
| Status: |
Resolved
|
| Resolution: |
Fixed
|
| Priority: |
Minor
|
| Assignee: |
Tim Hunt
|
| Reporter: |
Sam Marshall
|
| Votes: |
1
|
| Watchers: |
9
|
|
|
|
Assign Roles is more complex than it needs to be, because it always shows all roles that the current user is allowed to assign. For example if you do Assign Role for a course it shows 'Administrator' as an option, but that role isn't usually appropriate at course level. Similarly, it shows 'Student' at site level, where that role isn't usually appropriate.
There might be special cases where that kind of role assignment is useful but they are the exception not the rule. So I think it would be useful to have a 'Basic/Advanced' kind of set up for Assign Roles, where by default it shows only roles that usually apply at a given contextlevel, but if you click Advanced, you can assign others. Alternatively, maybe those special cases are so rare that it doesn't matter, and no Advanced mode is needed.
In order to configure this system, as part of defining a role, there would be a set of checkboxes for each contextlevel (site, category, course, module, etc). This would control entries in a database table such as mdl_role_contexts (role, contextlevel). That table could then be used to filter the display on the assign roles screen.
(Note that the OU may have time to implement this. If moodle hq would like us to, please let me know.)
|
|
Description
|
Assign Roles is more complex than it needs to be, because it always shows all roles that the current user is allowed to assign. For example if you do Assign Role for a course it shows 'Administrator' as an option, but that role isn't usually appropriate at course level. Similarly, it shows 'Student' at site level, where that role isn't usually appropriate.
There might be special cases where that kind of role assignment is useful but they are the exception not the rule. So I think it would be useful to have a 'Basic/Advanced' kind of set up for Assign Roles, where by default it shows only roles that usually apply at a given contextlevel, but if you click Advanced, you can assign others. Alternatively, maybe those special cases are so rare that it doesn't matter, and no Advanced mode is needed.
In order to configure this system, as part of defining a role, there would be a set of checkboxes for each contextlevel (site, category, course, module, etc). This would control entries in a database table such as mdl_role_contexts (role, contextlevel). That table could then be used to filter the display on the assign roles screen.
(Note that the OU may have time to implement this. If moodle hq would like us to, please let me know.) |
Show » |
tjhunt committed 12 files to 'Moodle CVS' - 06/Nov/08 04:34 PM
role assign: MDL-8312 Restrict which roles can be assigned at which contextlevels.
* New table role_context_levels
* Populate table with defaults on install
* Populate table on upgrade with the same defaults, plus any additional ones needed to ensure all the role assignments already in the database are allowed.
* Change get_assignable_roles to respect these settings.
* UI for these settings on the add/edit role form.
* Save these settings when a role definition is saved.
* If in a context, there are no roles you can assign, display a polite message.
* Back up these settings.
* Restore these settings. When resotring a <=1.9.x backup file, any newly imported roles are set to be assignable at all contextlevels.
Restore not tested because it is broken in HEAD.
|
|
|
committed 5 files to 'Lang CVS' - 07/Nov/08 06:11 AM
MDL-17070 Translated new strings for admin.
MDL-17153 Updated translated strings for completion system.
MDL-17129 Translated new strings for error messages.
MDL-8312 Translated new strings for role.
|
|
|
tjhunt committed 1 file to 'Moodle CVS' - 07/Nov/08 11:51 AM
martignoni committed 1 file to 'Lang CVS' - 16/Nov/08 07:53 PM
|