bdecentgmbh / moodle-block_dash

The interface and report builder for moodle
https://bdecent.de/dash
6 stars 4 forks source link

Completion data source – when are completion records created? #60

Closed stefanscholz closed 4 years ago

stefanscholz commented 4 years ago

I assumed that when a course has completion criteria set up and the cron has run, for each enrolled user with the student role, a completion record would exist.

Instead, it seems that users that have at least one completion criteria completed get a completion record. Is that right?

I have 100 students in the course, which are split into 3 groups. My expectation was that I see in the completion data source all 100 users (given that completion criteria are set and the cron has run); instead, I only see the student that has completed an activity.

Is there anything we can do about that?

stefanscholz commented 4 years ago

I have (manually) created another test course, enrolled 100 users as students, added two activities with activity completion, ran the cron job, and no users showed up.

I then completed one activity as one of those users, and that user showed up.

Now, after 15 minutes, all users show up. I therefor asume there are several cron jobs creating the completion entries and it's just a matter of time? Can you confirm that? Or am I misinterpreting something here? :confused: :(

moodledev commented 4 years ago

This is because Moodle only checks for new enrollments occasionally. There are two relevant cron tasks:

Completion mark as started: Every day at 3:18 (No idea why, the cron expression is 18 3 *) Calculate regular completion data: Every minute

These are my defaults for 3.8. I recommend setting "Completion mark as started" to run much more frequently. Perhaps every 5 minutes. (5 )

When a user completes an activity I think it forces a completion to be created.

stefanscholz commented 4 years ago

Perfect, that explains it. So it won't be a problem in the real world, wonderful.