Hello everyone, first post here.
I have read the documentation (https://docs.moodle.org/27/en/Context) and used context in real code but I'm not sure to really understand the context hierarchy of a (custom) block inside "my" page.
- From within the block, $this->context is "block". That's fine.
- I would expect the parent context of "block" to be "user" (logically not from the doc), but it is "system".
- Strangely, $this->page->context (which is in some ways the parent of the block widget?) return context user.
Can someone help me understand why block parent context is system? Maybe I should always use the page context?
Thanks in advance,
Eric