Restriction by date issue

Restriction by date issue

by Евгений Мамаев -
Number of replies: 1
Picture of Plugin developers

Hello!

Currently we develop a new course module which has availability restriction setting.

One issue we came upon is when we set restriction by dates.

There is a date the activity is available from (say, 18 Jan 2020 00:00) and a date the activity is available to (say, 19 Jan 2020 00:00).

We found that Moodle stores these dates in database correctly. But on a course page it displays the last date as 18 Jan 2020. Shouldn`t it be 19 Jan 2020?


The screenshot of the settings


If we set date until 19 Jan 2020 00:05, then it displays like this

 

 

The same thing happens in all standard course modules, not just with the one we develop

 

Our environment is this



Average of ratings: -
In reply to Евгений Мамаев

Re: Restriction by date issue

by Melanie Scott -
Picture of Particularly helpful Moodlers
I suspect it displays that way because you are saying the activity doesn't open until after that time--which really means after the previous day is over...so it is just saying that, even if it isn't exactly what you said. It is weird but it sort of makes sense.