As I wrote above, the date is not checked at all - it is entirely down to whether or not the user viewing the course has met the completion criteria for the course. If they have, it is a past course, if not it is a current course
$today = time();
is the time on the server correct? Or are you sure its actually the course with the end date set and not another course that looks similar but is not and does not have the end date set.
Yep, end date is set, server time is correct... and it's the same course because the teacher who has it on her dashboard just clicks it, enters the course and shows me the settings of that course (start and finish date)
But... I have found out something. I disabled 'completion tracking' on this course and now it has moved to 'past' on the dashboard. So that's good.
But.. it's still in the 'my courses' top menu. I thought the 'my courses' top menu was following the 'in progress' courses on the dashboard. Is that yet a wrong assumption of mine
Odd as in M3.5 I was able (as an admin) to move a course between past and future just by changing the dates with completion tracking on!