[3.5]Why is this course in 'in Progress' on dashboard?

Re: [3.5]Why is this course in 'in Progress' on dashboard?

by Davo Smith -
Number of replies: 5
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I've checked the code now and confirmed that 'past' courses are those which have been completed and 'current' courses are those which are enrolled and not yet complete.

As for why this would happen on a teacher's dashboard - as far as I am aware the block is generic for all users on the site. It does not distinguish between users who may have the 'teacher' role on some courses and those who may have the 'student' role on some courses.


In reply to Davo Smith

Re: [3.5]Why is this course in 'in Progress' on dashboard?

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

Is there a specific cronjob for this or something? My cronjob runs every minute and has no errors as far as I know.

This is really weird. I have other teacher reporting this as well for other courses.

Are you sure it's only the date that is being checked?

In reply to Richard van Iwaarden

Re: [3.5]Why is this course in 'in Progress' on dashboard?

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

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 

In reply to Davo Smith

Re: [3.5]Why is this course in 'in Progress' on dashboard?

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

github.com/moodle/moodle/blob/MOODLE_35_STABLE/blocks/myoverview/classes/output/courses_view.php#L115-L150 -> github.com/moodle/moodle/blob/MOODLE_35_STABLE/course/lib.php#L4130-L4168

Given:

$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.

In reply to Gareth J Barnard

Re: [3.5]Why is this course in 'in Progress' on dashboard?

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

Hi Gareth,

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 smile

In reply to Richard van Iwaarden

Re: [3.5]Why is this course in 'in Progress' on dashboard?

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

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! smile