We want to develop a plugin to allow granular course visibility and access.
We already found
https://moodle.org/mod/forum/discuss.php?d=350518#
So with standard functionality it is already possible to allow certain roles to access hidden courses in specific categories.
But we cannot put the courses in different categories, instead we want to add a field to each course to control access (by cohort).
Adding the field is not the problem, but I am searching for clean way to hook into the access system.
Would it be a clean way to extend $USER->access in an early hook with the current course path - in case the course is allowed to be viewed?
Or are there better / easier ways?
Any input is appreciated
Thanks and Regards,
Alex