I am trying to create access restrictions to a folder within a Moodle course using a Script . This restriction must be for groups of users and if you do not belong to that group, you can not see the existing resources in that folder.
The operation I want to do through programming is like the following:
I have searched for information and it is very scarce and in the documentation just shows how to do it from the web link .
I know how to create groups, folders and sections programmatically from a script, but I can not identify the tables that must be used to make these restrictions or what are the steps to follow.
If someone knows how to do it or has an example or documentation that can help me, it will be a great help for me.