Affects Version/s: 3.2
Fix Version/s: None
MDL-49029 mod/choice:view capability was added and it required nothing else than the capability without any extra has_capability checking, as modinfo is checking mod/$modname:view capability permissions for us. This includes:
- require_login & require_course_login with $cm
- validate_context (external functions)
- get_all_instances_in_course instances
- global search
We should be consistent across activities and perform the same kind of checkings. Right now some modules have a require_capability in mod/name/view.php some of them don't, mod/name/index.php should include a big require_capability on top of all other checkings?
I see this mod/$modname:view capability as the whole activity is not available for users without this capability. This issue will also help us check that we are not missing any point of entry when the capability is disabled.
Creating an issue for it as suggested by Eloy.