contextid, please explain :)

contextid, please explain :)

by Jason Lea -
Number of replies: 1

Hi there

could someone very kindly please explain the contextid from mdl_role_assignements and what its all about.
i've heard it a combination of certain id's from different table, could someone pls explain.
Would be much appreciated புன்முறுவல்

Regards
Average of ratings: -
In reply to Jason Lea

Re: contextid, please explain :)

by Tim Hunt -
Core developers இன் படம் Documentation writers இன் படம் Particularly helpful Moodlers இன் படம் Peer reviewers இன் படம் Plugin developers இன் படம்
Wrong forum, but ...

It refers to the ids in the mdl_context table.

There, clear as mud கண்சிமிட்டு


OK, so what a context is is explained here: http://docs.moodle.org/en/Question_permissions_explained_with_diagrams

How that is stored in the database is sort of explained here: http://docs.moodle.org/en/Development:Database_schema_introduction#The_roles_and_capabilites_system. Actually, the best docs is probably in lib/accesslib.php. For example, look at the PHPdoc comment for get_context_instance.