As you know, in Moodle you have a button to 'Turn (blocks) editing on/off'. Exactly where this depends on who you are and where you are (that is, on roles and capabilites).
The question is, how should we track that state for each user? Obvious options include:
- Just one state that applies everywhere.
- Track a separate state for each course.
- Something else.
At the moment, it seems we mostly do 1., but with some inconsistencies I would like to eliminate the inconsistencies.
The consistent part is
- a flag $USER->editing that is stored in the session.
- a separate flag $USER->adminediting for admins that controls whether you are editing the blocks on the admin screens.
- and another flag $SESSION->blog_editing_enabled for editing blocks on your blog page.
And the only indications we have of the modality are
- The presence of the editing UI on the page
- the caption on the editing on/off button.
So, anyway, I am looking for suggestions of how it should work. Please justify your answer, and bonus marks for answers that are easy to implement