- In the db table "mdl_capabilities", is the "contextlevel" column there purely so that the UI can know if it's meaningful to assign this capability at that level?
- In table "mdl_role_capabilities", why are all capabilities assigned at contextid = 1, which is the default CONTEXT_SYSTEM level context? If the capabilities are supposed to be "assignable" (by assigning a role) to any context, then what is the purpose of this column? In my database there is no row with contextid != 1, even though I have a teacher in a course somewhere (and that teacher has elevated capabilities in the context of that course). Why is contextid there at all?
- Is "mdl_role_capabilities" generated purely by the information in /lib/db/access.php? How can I force a repopulation of that table? I tried tweaking access.php for a capability with component = "moodle" and bumping the version inside /version.php, but although Moodle did an upgrade I didn't see a change in that table.
Cheers
Jon
PS: And since we 're here... what's "modifierid" in that table? Thanks!