Resolution: Cannot Reproduce
Affects Version/s: 2.1.1
Fix Version/s: None
Component/s: Course completion
Environment:XAMPP 1.7.4 localhost, Moodle
Attached notes detail how I set up the course completion test. After setting up, I attempted to run my first student through the first course. I am trying to learn how to use this feature (developer's beware).
Student (I think this also happened to admin) received this error in course completion status block and clicking on "more details". The student had passed the Lesson and Quiz and a check marked appeared next to each activity. No teacher had checked that the course was complete. Received a red block warning. I turned on dev debug level and got:
Status: Not yet started
Required: All criteria below are required Then red box
Notice: Trying to get property of non-object in C:\xampp174\htdocs\moodle21\lib\completion\completion_criteria_course.php on line 213
Can not find data record in database table course.
More information about this error
Debug info: SELECT * FROM
WHERE id IS NULL
line 1265 of \lib\dml\moodle_database.php: dml_missing_record_exception thrown
line 1242 of \lib\dml\moodle_database.php: call to moodle_database->get_record_select()
line 1807 of \lib\accesslib.php: call to moodle_database->get_record()
line 2218 of \lib\accesslib.php: call to create_context()
line 213 of \lib\completion\completion_criteria_course.php: call to get_context_instance()
line 186 of \blocks\completionstatus\details.php: call to completion_criteria_course->get_details()
Below this was the header for the report, with no rows of data below it.