here is some code to test ( not for production system ) to regulate the rights for groups in a course based on calendar events.
1 - The regulation is calendar events dependant.
2 - Control at the course, module, group and time levels.
3 - All activities and resources are planned to be regulated ( only assignment, resource and quiz may be tested now ).
4 - One event may regulate as many activities and resources as you want for one time period.
4.1 - To activate one or many activities you create an event with the exact names of the activities ( one per line in text mode ) in the description of the event. ( Select from course view copy and paste of one or many works fine ) and specify who will have access during that period:
4.1.1 - Course events give access at all the participants.
4.1.2 - Group events give access to only members of the group during the specified period.
4.1.3 - Calendar repeat events are supported.
5 - When someone try to access an activity or a resource not available at the present time, a list of all events pertaining to that activity is presented to permit to check the available dates ( group dependant )
6 - It is possible for one course to enable the activation at the module level:
6.1
- One may choose to enable only the resource module with the regulation
system. If so all other modules of the course will work as usual.
6.1.1 - For that create an event with that "reserved word" in it description: EnableModResource.
6.1.2 - That regulation will be applicable only durint the duration of the event:
6.1.3 - Before and after all Moodle resource of that course will be accessible as usual.
6.1.4 -During the EnableModResource event period, only the resources with an event containing their exact name in the description will be available.
7 - The internal working is not very invasive on Moodle internal, much less that activity linking.
7.1 No impact on course view page.
7.2 No new database fields.
7.2 No new database fields.
8- If some interest, any help will be greatly appreciated to write it in intelligible english sentences.
Suggestions are welcome.
Have a good test,
Bernard