Where in the database are overrides stored?

Re: Where in the database are overrides stored?

by Tim Hunt -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Guest access is a bit of a mess. Be warned. But with enough staring at the code, you can probably make something work. I just though I should warn you that if you are looking at the code and thinking "this is a horrible mess", then you are right and Petr Skoda is currently working on how to clean up the mess for Moodle 2.0.

But, to answer your question, overrides and role definitions are stored in the role_capabilities table. If role_capabilities.contextid == get_context_instance(CONTEXT_SYSTEM)->id then it is part of the role definition. If role_capabilities.contextid is something else, then it is an override in that context.