Course completion is set to "ALL activities to be completed" and as you can see, they're all completed for these students. What else can I check? I enabled the course completion block and it shows that these activities are not complete- but it is indicated that they are!
Sorry Frances that you've had no reply to your question. At a guess I wonder if the cron job triggers the checking and it has not been run?
Thanks for the thought, I manually ran cron job and it did not satisfy the problem,
It certainly looks like a CRON issue. You need to run the CRON 3 times between activity completion and course completion.
What version of moodle / host etc?
Do you have access to the back end database? You may be able to see what is happening there by investigating the course_modules_completion table as well as the course_completions table.
Cheers
Peter
Just to say that I faced the same problem yesterday on my Moodle site (v 2.6). I'm a front-end Moodle admin and don't have access to the Moodle server, so I can't do any cron stuff apart from the browser-triggered cron (<moodle site>/admin/cron.php). That didn't help. I just waited overnight and this morning I could see the course complete box ticked I suppose the cron job had run the required number of times.
Hello everybody,
I am facing the same problem: just an activity completed but course not marked as completed. I tried to modify the file cron.php as suggested by Peter Dekker and then I made the Cron job run executing a bat file containing this line
@echo off C:\Bitnami\moodle-3.1.2-0\php.exe -f C:\Bitnami\moodle-3.1.2-0\apps\moodle\htdocs\completion\cron.php >> C:\Bitnami\moodle-3.1.2-0\moodle-cron.log
Several times, but nothing changed.
I also tried do modify the last lines on cron.php in this way: from this
function completion_cron_aggregate($method, $data, &$state) {
if ($method == COMPLETION_AGGREGATION_ALL) {
if ($data && $state !== false) {
$state = true;
} else {
$state = false;
}
} elseif ($method == COMPLETION_AGGREGATION_ANY) {
if ($data) {
$state = true;
} else if (!$data && $state === null) {
$state = false;
}
}
}
To the following
function completion_cron_aggregate($method, $data, &$state) {
if ($method == COMPLETION_AGGREGATION_ALL) {
if ($data && $state !== false) {
$state = true;
} else {
$state = true;
}
} elseif ($method == COMPLETION_AGGREGATION_ANY) {
if ($data) {
$state = true;
} else if (!$data && $state === null) {
$state = true;
}
}
}
But still nothing happens.
There should be no need to modify cron.php. If you look at your scheduled tasks, you should be able to tell if cron is running correctly.
Hi Emma, thanks for your suggestion. Would you mind to indicate the path to shceduled tasks ?
Thanks a lot. Cheers
Hello, I found the path to scheduled tasks, the problem is 1) I am not sure i correct identify the tasks 2) even if I have tasks scheduled to run every minute, last run column says they have never been run (as it comes out for the two scheduled tasks which I suspect to be relevant (see attached screenshot please)
The fact that they have never run means that cron is not setup or not setup correctly. You need to get cron running...
Hello Emma,,
may you indicate to me how can I get cron running ?
Thanks a lot