apluslms / a-plus

A+ frontend portal - A+ LMS documentation:
https://apluslms.github.io/
Other
65 stars 72 forks source link

Deadline extensions misbehave if they cross daylight savings time start/end #1287

Closed jsorva closed 4 months ago

jsorva commented 10 months ago

It’s not uncommon to grant students long deadline extensions — one week or more. This happens for various reasons (e.g., medical issues, groups of high school students with a different schedule, etc.)

A+ supports this by allowing teachers to give an extension measured in days. The intuitive interpretation of this is that if a deadline at X o’clock is extended by Y days, the new deadline will be at X o’clock the same time, but Y days later. This is, however, not necessarily what happens.

It appears that if daylight savings time starts or ends during the deadline extension, the new deadline will be at X-1 or X+1 o’clock. For example, if I give a 7-day extension to our Wed 6pm deadline from late October to early November, the student will be able to submit until Wed 5pm the following week.

The practical consequence is that teachers should be constantly aware of upcoming clock-windings. (And of course they won’t remember.) And the student will see confusing info about their deadline extension and won’t be able to submit their work close to the extended deadline that was intended.

This also affects the (again not-super-rare) case that multiple deadlines are extended at the same time. For example, there are cases where a student’s entire course schedule needs to be shifted by, say, three weeks. The convenient way to do this is to go to the DL extension form, select all the modules and mark 21 days as the extension. What then happens is that the September, October, and December deadlines will shift appropriately but the November deadlines will be one hour too early.

Suggested solution: When using the Days field in the form, automatically check whether a daylight savings boundary is crossed and adjust the extension length accordingly.

(Side note: in principle, someone could decide to give a week’s extension by extending the DL by 10080 minutes instead of 7 days. Before the Days field was added, that was indeed the only way to do it. But I think that strategy can now be considered an exotic relic of the past, and the fix could focus on just the Days field that actually matters.)

jsorva commented 10 months ago

Related but harder to fix: https://github.com/apluslms/a-plus/issues/1137