Whats the significance of Conext table and contextlevel.

Re: Whats the significance of Conext table and contextlevel.

by John Isner -
Number of replies: 0
Contexts form a hierarchy: Blocks and modules are inside courses, courses are inside categories, etc. Here's a somewhat out-of-date diagram. Moodle uses a user's current context to determine his permissions. So if you're a Teacher in a Course context, you have all the permissions you need to edit and manage the course. Course context is represented in the database by the integer 50.

For more information, read this short article in the documentation wiki.