
Restriction by relative date
- Moodle 5.1–5.3
- 中文 75%
- 更新 2026-10-06
Restrict module and section access based on a relative date.
Relative dates are experimental since Moodle 3.8 but are only implemented in the Assignment activity and the Weekly course format. If you want to use relative dates in other parts of a course, you can use this plugin.
This availability condition makes it easy to show modules or sections only x minutes/hours/days/weeks/months
before/after course start date
before/after course end date
after user enrolment date
after enrolment method end date
after the completion of an activity
Using Restriction sets, it is easy to make a resource available for a limited relative time.
Check the global documentation about availability conditions : https://docs.moodle.org/en/Conditional_activities_settings
Installation:
Unpack the zip file into the availability/condition/ directory. A new directory will be created called relativedate.
Go to Site administration > Notifications to complete the plugin installation.
Warning
This plugin is 100% open source and has NOT been tested in Moodle Workplace, Totara, or any other proprietary software system. As long as the latter do not reward plugin developers, you can use this plugin only in 100% open source environments.