I get the following error when cron tries to send certificates via email
customcert version 4.0.1 (2022041901) in moodle 4.0.2 ( 20220711)
Execute scheduled task: Gestisce l'invio dei certificati via email (mod_customcert\task\email_certificate_task)
... started 22:25:08. Current memory use 2.7 MB.
... used 48 dbqueries
... used 0.060248136520386 seconds
Scheduled task failed: Gestisce l'invio dei certificati via email (mod_customcert\task\email_certificate_task),È stato rilevato un errore di programmazione, deve essere sistemato da un programmatore: Context does not belong to any course.
Backtrace:
line 1540 of /lib/enrollib.php: call to context->get_course_context()
line 1454 of /lib/enrollib.php: call to get_enrolled_join()
line 1508 of /lib/enrollib.php: call to get_enrolled_with_capabilities_join()
line 1631 of /lib/enrollib.php: call to get_enrolled_sql()
line 96 of /mod/customcert/classes/task/email_certificate_task.php: call to get_enrolled_users()
line 253 of /lib/cronlib.php: call to mod_customcert\task\email_certificate_task->execute()
line 120 of /lib/cronlib.php: call to cron_run_inner_scheduled_task()
line 73 of /lib/cronlib.php: call to cron_run_scheduled_tasks()
I get the following error when cron tries to send certificates via email customcert version 4.0.1 (2022041901) in moodle 4.0.2 ( 20220711)
Execute scheduled task: Gestisce l'invio dei certificati via email (mod_customcert\task\email_certificate_task) ... started 22:25:08. Current memory use 2.7 MB. ... used 48 dbqueries ... used 0.060248136520386 seconds Scheduled task failed: Gestisce l'invio dei certificati via email (mod_customcert\task\email_certificate_task),È stato rilevato un errore di programmazione, deve essere sistemato da un programmatore: Context does not belong to any course. Backtrace: