Course relative dates in Moodle™: what moves for each learner, and what does not
Moodle can give each learner their own assignment due date, counted from the day they enrolled. It moves far fewer dates than the name suggests. This page sets out what the Moodle 5.3 code actually moves, the gap that catches learners who start late, and what you can do by hand.
In short: Course relative dates is still an experimental setting in Moodle 5.3 and can only be set when a course is created. It moves weekly section dates and the assignment due date by each learner's enrolment offset. Assignment opening and cut-off dates, quiz dates, access restrictions and the assignment reminders stay on the course-wide dates, so a learner who starts late can be given a due date after the cut-off and be unable to submit.
By Rohin Grover, 16 November 2026. Read in the Moodle 5.3.1 source code, with the assignment parts compared against 4.5.16, which works the same way. I worked from the code rather than testing every case on a live site, and the section on reminders says so again where it matters most.
Self-paced courses need dates that follow each learner. Someone who enrols on 20 March should not inherit the deadlines of someone who started on 1 March. Moodle has a setting for this, Course relative dates, and it is worth knowing exactly what it does before you build a course around it.
Two switches, and one of them is permanent
- Site. Site administration > Development > Experimental > Experimental settings > Enable course relative dates. It is off by default, and in 5.3 Moodle still files it under experimental.
- Course. With the site setting on, course settings show Relative dates mode, just below the course end date. You can only set it when you create the course. On an existing course the field is greyed out, and Moodle ignores it when the course settings are saved.
So an existing course cannot be switched over. Create a new course with Relative dates mode set to Yes and bring the content in with Import, or by restoring a backup into that course. The setting is not stored in course backups, so a restore neither brings it with it nor turns it off, and restoring a backup as a new course gives you a course without it.
How Moodle works out each learner's start
For each learner, Moodle takes the later of two dates: the course start date, and the start date of the learner's earliest enrolment that is active and uses an enabled enrolment method. The gap between that date and the course start date is the learner's offset. Every date that moves is moved by that offset.
- A learner enrolled before the course starts has no offset and gets the dates as set.
- An enrolment with no start date counts as starting with the course, so it also has no offset.
- A learner with no active enrolment, for example a suspended one, falls back to the course start date.
- The offset counts seconds, not days. A learner who enrolled at 14:30 gets due times shifted by those hours too, not just whole days.
- Nothing is stored. Moodle works the offset out on each page load, so if you change the start date on a learner's enrolment, their moved dates change with it.
An example: a course starts on 1 March and a learner's enrolment starts on 20 March. Their offset is 19 days, so an assignment due on 15 March is due for them on 3 April.
What moves and what does not
The per-learner start and offset come from one function in core, course_get_course_dates_for_user_id(). I searched the whole 5.3 core code for it. It is called in three places: once by the Weekly sections course format and twice by the assignment module. No other part of core reads it.
| Date | Moves for each learner? | Notes |
|---|---|---|
| Section dates in the Weekly sections format | Yes | Week 1 starts on the learner's own start date. |
| Assignment: Due date | Yes | Unless a user or group override sets a due date. The override wins. |
| Assignment: Allow submissions from | No | |
| Assignment: Cut-off date | No | The cause of the late-starter gap below. |
| Assignment: Remind me to grade by | No | |
| Quiz: Open the quiz, Close the quiz | No | The quiz module has no relative-date code. |
| Quiz: Due date, new in 5.3 | No | Added in MDL-82521. |
| Date conditions in Restrict access | No | |
| Activity completion: Set reminder in Timeline | No | |
| Calendar and Timeline entries for an assignment's due date | Not by any code I found | The assignment writes one due date event for the whole course, and the calendar and Timeline code has nothing that adds a learner's offset. Check what your learners see before relying on it. |
| Assignment due soon, overdue and digest notifications | No | See the section on reminders. |
MoodleDocs' Course relative dates page (last edited 1 May 2024) lists Allow submissions from, Due date and Cut-off date for assignments. The 5.3 code moves the due date only, and a comment in the assignment module says so: "The assignment module calculates relative date only for duedate." Moodle 4.5 has the same comment.
A display detail adds to the confusion. Teachers see an assignment's opening date and due date written relative to the course, in the form "... after course start", which suggests both move. Only the due date does. In a relative dates course the submissions table gains columns for Allow submissions from, Due date and Cut-off date per learner, which is the quickest place to see the gap described next.
The late-starter gap: a due date after the cut-off
Whether a learner can still submit is decided by the cut-off date, and the cut-off date does not move. Take the example above and give the assignment a cut-off date of 22 March:
- learners who started on 1 March: due 15 March, submissions close 22 March;
- the learner who started on 20 March: due 3 April, but submissions still close on 22 March.
From 22 March that learner sees a due date in the future and an assignment that no longer accepts work. Anyone who enrols after 22 March finds it closed on their first day.
The ways round it in core:
- Leave the cut-off date empty on assignments in relative courses. Work handed in after the due date is then accepted and marked as late, with no hard stop.
- Give the learner a user override with their own due date and cut-off date.
- Grant the learner an extension. An extension later than the cut-off date becomes their last date to submit.
Assignment reminders do not follow the offset
Moodle sends three assignment notifications: due soon (within the next 48 hours), overdue (in the 2 hours after the due date) and a digest of what is due in 7 days. I read how each one picks its recipients in the 5.3 code. I have not run them against a relative dates course on a live site.
Each notification is chosen in steps. The scheduled task first selects assignments by the assignment's own due date or an override's due date. The next step, for each learner, again uses the override date or the assignment's own date as worked out for the account the task runs as, which is the main administrator account, not the learner. Only the last step, just before sending, uses the learner's moved due date, and it drops the message when that date falls outside the window.
For a learner with an offset and no override, that means: when the course-wide date comes round, the message is dropped because their own date is later; when their own date comes round, the assignment is no longer selected. So a learner whose due date has moved by more than 48 hours gets no due soon message for it, one whose date has moved by more than 2 hours gets no overdue message, and the digest follows the same pattern. Learners with a user or group override are handled properly, because every step reads overrides.
Doing it by hand: overrides and their limits
Without relative dates, or for the dates it leaves alone, core Moodle offers these:
- Assignment overrides (User overrides and Group overrides, inside the assignment) can set Allow submissions from, Due date, Cut-off date and, if timed assignments are enabled, a time limit, for one learner or one group. In a relative dates course the user override form shows that learner's current dates, which saves working them out.
- Quiz overrides can set the open and close dates, the 5.3 due date, the time limit, the number of attempts and a password. Quizzes have no relative dates at all, so overrides are the only core way to give one learner different quiz dates.
- Assignment extensions (Grant extension, from the submissions page) move one learner's last date to submit, past the cut-off if needed.
- Intake groups. If learners start in batches, put each batch in a group, say a March intake, and give each group one override per dated activity. A user override beats a group override. When a learner is in several groups with assignment overrides, the group override with the highest priority wins, and you set that order on the overrides page. With relative dates on, a group override's due date replaces each member's moved due date, so everyone in the group gets the same date.
The limits are the same for all of them. An override is a fixed date that you work out yourself, for each late learner and each dated activity. It does not move if the learner's enrolment changes, and someone has to remember to add it every time a learner starts late. On a course with rolling enrolment that is a standing job, not a one-off.
For access rather than deadlines, there is a free third-party plugin, Restriction by relative date (availability_relativedate). According to its Marketplace listing it shows activities and sections relative to the course start or end date, the learner's enrolment date, the end of their enrolment method, or completion of another activity. It controls when something becomes available. It does not change the due date an assignment shows.
I am building Rolling Deadlines, a plugin for the dates core leaves fixed, such as cut-off dates, quiz dates and the reminders. It is in development and not released.
Where this comes from
Read in the Moodle 5.3.1 code (Build: 20261112), with the assignment parts compared with 4.5.16. Paths are relative to public/ in 5.1 and later:
course/lib.php:course_get_course_dates_for_user_ids(), which works out each learner's start and offset;mod/assign/lib.php:mod_assign_cm_info_dynamic(), where overrides and the relative due date are applied;mod/assign/locallib.php: the per-learner assignment settings, andsubmissions_open(), which checks the cut-off date;mod/assign/classes/notification_helper.php: how the three notifications choose assignments and learners;course/format/weeks/lib.php: section dates per learner;course/edit_form.phpandadmin/settings/development.php: the two settings.
Also MoodleDocs' Course relative dates page and two tracker issues. MDL-61209, a request to set activity dates relative to enrolment and course dates, was closed as Won't Do in June 2023 (status read on 16 November 2026). MDL-82521 added the quiz due date in 5.3.
If your courses need per-learner deadlines on a live site now, with overrides or with code written for your site, that is work I take on. How a job with me is agreed and run is on the page about hiring a developer for Moodle.
Common questions
- Does Moodle's relative dates setting move quiz dates?
- No. In Moodle 5.3, course relative dates moves weekly section dates and the assignment due date only. Quiz open and close dates, and the quiz due date added in 5.3, are the same for every learner. User or group overrides are the core way to give one learner different quiz dates.
- Can I turn on relative dates for an existing course?
- No. Relative dates mode can only be set when a course is created, and only after an administrator turns on Enable course relative dates in the experimental settings. Create a new course with the mode on and import the content into it. The setting is not stored in course backups, so restoring a backup as a new course does not bring it with it.
- Why can a learner not submit an assignment before their due date?
- In a relative dates course the due date moves with the learner's enrolment date, but the cut-off date does not. If the moved due date falls after the cut-off date, submissions still close at the cut-off. Remove the cut-off date, give the learner a user override, or grant them an extension.
- Do assignment reminders follow each learner's relative due date?
- Not in the Moodle 5.3 code. The due soon, overdue and due date digest notifications pick assignments and learners by the assignment's own due date or an override date, then drop the message when the learner's own date falls outside the window. A learner whose due date has moved further than the window gets no reminder for it. A user or group override avoids this, because every step reads overrides.
Talk it through with Rohin
Bring the messy version of the problem. A free 30-minute session is usually enough to tell you whether it is a small fix or a real project, and what it would take either way.