Restrictions Table?

Restrictions Table?

by Amy Tucker -
Number of replies: 3

We're programmatically adding courses/activities/pages etc to moodle.  We'd like to also add restrictions but I can't find the database table that deals with restrictions? could someone point me in the direction please?


Average of ratings: Useful (1)
In reply to Amy Tucker

Re: Restrictions Table?

by Itamar Tzadok -

You are in the wrong forum. For development questions, try the General developer forum.

With respect to your question, if by restrictions you refer to the Restrict access conditions, then these are availability plugins which are located under your-moodle-root/availability/condition. If you're not looking to add restriction types, but only to manipulate existing conditions in your programatically added instances, then the availability conditions are stored for each instance in the availability columns in the respective table. For course section it would be in the mdl_course_sections, for activities and resources it would be in the mdl_course_modules, etc.

hth smile

Average of ratings: Useful (2)
In reply to Itamar Tzadok

Re: Restrictions Table?

by Amy Tucker -
Prefect, thank you for the reply. Sorry about posting in the wrong section, I'm new.