Availability conditions: Restriction by relative date
availability_relativedate
Maintained by
Renaat Debleu
Restrict module and section access based on a relative date.
271 sites
167 downloads
18 fans
Current versions available: 2
Relative dates will be experimental in Moodle 3.8. Until then we can restrict module and section access based on a relative date.
This availability condition makes it easy to show modules or sections only x days/weeks/months - after course start date - before course end date - after user enrolment date.
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.
Useful links
Contributors
Renaat Debleu (Lead maintainer)
Please login to view contributors details and/or to contact them
I want to report a bug: access restrictions are being updated dynamically according to local time, no matter how much in the configuration of the restriction we have selected "based on the user's enrollment in the course".
please use the bug tracker to report a bug. Do not forget to add your Moodle and plugin version .
R
Install the latest version of the 3.8+ plugin (2020110200) in Moodle 3.9.2+, it does not take the relative dates from when the student enrolled in the course, but since the plugin was updated or by the server date.
Similar to the bug that Joao Pedro mentioned earlier.
Can you help me with this please.
However after the update (the last two), a serious error started to occur.
Every time the student enters moodle, the relative date is updated based on the time he last accessed moodle.
Soon the student is never able to access the content with relative date.
We structured our entire grid with this plugin, and now we have this problem after updating the plugin.
I had a similar problem in the version that was solved in version 3.8+ (2020111000).
Do you have that version?
Excellent plugin, congratulations !! How can I do to increase the number of days to more than 50, as this is the limit that can be selected in the plugin for days, weeks or months
You can change the form.js source file and rebuild the YUI modules. Or you can suggest a new number (100 - 365 - ?) in the bug tracker and wait until it is implemented for you. I opted for choices between 1 and 51 to cover 51 weeks and to make the dropdown not too long. Any suggestion is welcome.
for (i = 1; i <52; i ++) {
html + = '' + i + ''; "??? Thank you, as I have urgency in this
The functionality you used was reported as a bug in one of our projects, so the plugin was updated to take the most recent enrollment as a starting point. Luckily this project is Open Source, so you can create a fork and modify line 222 of the classes/condition.php file to "restore" this bug.
R
Thanks for your plugin!
Teachers in my university ask me the following question... Could relative dates be linked to completion of another activity?
Regards
THX for the feedback. You mean something like 3 days after completing quiz 4?
Technically this seems possible to me. Although a lot of work would be needed to implement a cache for performance reasons.
But for the moment I do not see a lot of extra value in this link to completion of another activity. Completing an activity would become more a punishment than a achievement....
Can you provide some samples where this extra restriction could be used in a way students are encouraged instead of discouraged?
Of course, currently you can already combine restrictions: Quiz 4 is completed AND 4 weeks after course start date.
R