PHP 7.3.21
CentOS
I am trying to add a couple of new activities to the course completion list but when I go to the activity completion page I get the following error.
Can't find data record in database table course.
I turned on developer debugging and it said:
Status Not yet started
Required All criteria below are required
Can't find data record in database table course.
More information about this error
Debug info: SELECT id,category FROM {course} WHERE id IS NULL
[array (
)]
Error code: invalidrecord
Stack trace:
• line 1599 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
• line 1575 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
• line 6928 of /lib/accesslib.php: call to moodle_database->get_record()
• line 218 of /completion/criteria/completion_criteria_course.php: call to context_course::instance()
• line 186 of /blocks/completionstatus/details.php: call to completion_criteria_course->get_details()
Any help in fixing this would be gratefully received.
I've already tried running cron 10-15 times to run the clean up tasks but that didn't help.