|
Eloy Lafuente (stronk7) made changes - 21/May/08 11:00 PM
Assigning this to Martin... ciao
Not so fast.
Do we want (1) a tool for debugging actual roles-related problems or (2) a tool allowing administrators to run academic what-if scenarios? Both are valid use cases, but for me (1) is far more important. Tim and I discussed this in: http://moodle.org/mod/forum/discuss.php?d=91993 If we want a tool for (2), we should consider incorporating the functionality of the Role debugger into core. http://moodle.org/mod/data/view.php?d=13&rid=1204 The Role Debugger can be used by any user, not just the administrator, and it gives the user a complete analysis of his own permissions, not just his role assignments. I gave an extended use case for it in Please do not misunderstand me: I have been using the User's roles report since March, and I find it very handy for getting a quick snapshot of a user's global role assignments. I have helped dozens of users debug complex roles-related problems using the Roles debugger (see the use case "A roles expert helping a roles novice debug a roles-related problem"), usually in a single iteration. These were problems of the most difficult kind – self inflicted problems created by administrators who had fiddled with roles without understanding what they were doing. In some cases the administrators could not access the site administration block. Anyway, this issue should be linked to
Howard Miller made changes - 22/May/08 03:21 AM
I must admit that I only quickly looked at the roles debugger and couldn't figure out what it did, but that's my impatience.
I like Tim's report, because it hit the nail on the head for functionality that I have been missing. If I am sorting out a roles problem, the number one problem is that there is, by default, no way at all to tell what roles a user has throughout the site. Of course, this is 99% the root of roles problems - you didn't know about a role assigned somewhere else. In a complex Moodle site, even if you do know about the assignment, it can be very hard to find. I always considered this a surprising omission. Tim's addon is very simple and, I suspect, solves a huge percentage of roles problems. However, I'm not partisan about it - but, we need to get something in to handle this function. And, of course, I've just realised that the search is not only by username it is (for the record) a fuzzy match on firstname, lastname, username, and idnumber.
Martin Dougiamas made changes - 22/May/08 10:09 PM
Also, whereas John Isner is right - a complex permissions analysis tool would be a great boon, this User's Roles tool from Tim is very useful, and would I suspect, be very easy to port into the core. But, dare I ask, could it be titled "Assigned roles" which is a little less difficult to say and lays the emphasis on what has been assigned rather than the permissions that will result.
I agree. I guess it just needs the strings done and it's pretty much there. I'm not sure it should be in Reports though - probably in the user section may make more sense. Mmm... not sure.
On a site note.... the ajax name lookup is inspired! I find myself wishing things like the roles assign screen did something similar. ...because it isn't strictly a report, since you can also change the role assignments within it.
Howard Miller made changes - 03/Jul/08 11:03 PM
Petr Skoda made changes - 05/Jul/08 11:09 PM
Howard Miller made changes - 25/Jul/08 11:08 PM
Howard Miller made changes - 28/Jul/08 04:08 AM
Martin Dougiamas made changes - 15/Oct/08 03:00 PM
Tim Hunt made changes - 27/Oct/08 05:31 PM
tjhunt committed 5 files to 'Moodle CVS' - 21/Nov/08 05:23 PM
tjhunt committed 3 files to 'Moodle CVS' - 24/Nov/08 03:33 PM
Done. Now integrated into the roles tab in the users profile.
We may need to think a bit harder about exactly who should be seeing this information. At the moment, it is shown to anyone who can see the roles tab (the rules for that have not changed). Note that the part about bulk removing role assignments has gone. That may come back, but only if I have time to work on MDL-10002.
Tim Hunt made changes - 24/Nov/08 03:35 PM
Mitsuhiro Yoshida committed 2 files to 'Lang CVS' - 25/Nov/08 02:43 AM
Reopening this. One sql query seems to refer to active field in role_assigments which doesn't currently exist:
Unknown column 'ra.active' in 'where clause' SELECT ra.id, ra.userid, ra.contextid, ra.roleid, ra.enrol, c.path, r.name AS rolename, COALESCE(rn.name, r.name) AS localname FROM mdl_role_assignments ra JOIN mdl_context c ON ra.contextid = c.id JOIN mdl_role r ON ra.roleid = r.id LEFT JOIN mdl_role_names rn ON rn.roleid = ra.roleid AND rn.contextid = ra.contextid WHERE ra.userid = ? AND ra.active = 1 ORDER BY contextlevel DESC, contextid ASC, r.sortorder ASC
Dan Poltawski made changes - 26/Nov/08 11:35 PM
tjhunt committed 1 file to 'Moodle CVS' - 26/Nov/08 11:49 PM
Tim Hunt made changes - 26/Nov/08 11:49 PM
martignoni committed 1 file to 'Lang CVS' - 07/Dec/08 07:57 PM
martignoni committed 1 file to 'Lang CVS' - 07/Dec/08 11:28 PM
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
http://moodle.org/mod/data/view.php?rid=1005&page=16