$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