The intention here is that it should be possible to mark a course, and all activities within it as read-only. The primary purpose here is for course rollover and/or archive to give students read-only access to a course after it has been completed.
The approach proposed here at the 2015 Melbourne Moot was:
- provide a way to say that a course, activity, etc. is in read-only mode. This could be a simple checkbox, or it could be a fromdate kind of thing.
- when checked, we modify has_capability() to return false for all capabilities which are marked as being write capabilities
- we have one capability to change that setting. That capability must be a read capability (otherwise it can never be disabled)
- the read-only applies to admins too
- mod_assign still has a capability for whether you can submit, which is used to show you if you have any submissions. It shoudl show your existing submissions regardless of your current capability
- UI mockups + consideration of UX
Other thoughts and notes:
- Have a cap to enable the setting too - probably different to the disable cap (don't want it to be turned on by mistake)
- Start with a UI to allow setting/unsetting of the field. Shown in the course settings dropdown somewhere to those with the cap
- Also show in activity settings dropdown
- Need to think about how to make this apply to child contexts in a sane and sensible approach
- Need to check for other locations that abuse capabilities