Contexts are the areas in Moodle where roles can be assigned to users. A role (remember, a collection of capabilities with corresponding permissions) can be assigned within different contexts. A user has a role in any given context; a context can be a course, a course category, an activity module, a user, a block, or Moodle itself. Moodle comes with seven contexts that you will come across a lot in this chapter:
Each context is like a ring-fenced area or boundary in which certain actions can be carried out. It is also sometimes referred to as a scope. You can compare this to a large company with multiple divisions and departments. A manager of...