Starting in the attendance module for a specific course:
http://classes.wrfr.com/mod/attendance/manage.php?id=724
I click on a specific session and get to this page:
http://classes.wrfr.com/mod/attendance/take.php?id=724&sessionid=11&grouptype=0
... with list of students in it.
Regardless of whether I check any students or not, I scroll to bottom and click "Save" and get Invalid course module ID error on this page:
http://classes.wrfr.com/mod/attendance/take.php
If I have changed any of the students' attendance information (for example, clicking "P") that information is saved correctly, even though the next page shows an error.
6 weeks or so ago I went through large upgrade path from 1.9.x to 3.6.1. Today I upgraded successfully to 3.6.2. I turned on debugging and here's what I got:
------------------------------------------------------------------------------------------------------------
At top of screen I get this debugging dump:
Notice: Trying to get property of non-object in /home1/wrfrcom/public_html/moodle2/lib/grade/grade_item.php on line 2499
This page should be using theme chameleon which cannot be initialised. Nor can the site theme chameleon. Falling back to boost
line 711 of /lib/outputlib.php: call to debugging()
line 1553 of /lib/pagelib.php: call to theme_config::load()
line 1892 of /lib/setuplib.php: call to moodle_page->initialise_theme_and_output()
line 386 of /lib/setuplib.php: call to bootstrap_renderer->__call()
line ? of unknownfile: call to default_exception_handler()
------------------------------------------------------------------------------------------------------------
Then the actual error dump is:
Invalid course module ID
More information about this error
Debug info: SELECT id,course FROM {course_modules} WHERE id IS NULL
[array (
)]
Error code: invalidcoursemodule
Stack trace:
line 1546 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
line 1522 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 7052 of /lib/accesslib.php: call to moodle_database->get_record()
line 2499 of /lib/grade/grade_item.php: call to context_module::instance()
line 1242 of /lib/grade/grade_grade.php: call to grade_item->get_context()
line 1054 of /lib/grade/grade_grade.php: call to grade_grade->get_context()
line 369 of /lib/grade/grade_object.php: call to grade_grade->add_feedback_files()
line 1025 of /lib/grade/grade_grade.php: call to grade_object->insert()
line 647 of /lib/grade/grade_category.php: call to grade_grade->insert()
line 567 of /lib/grade/grade_category.php: call to grade_category->aggregate_grades()
line 743 of /lib/grade/grade_item.php: call to grade_category->generate_grades()
line 1271 of /lib/gradelib.php: call to grade_item->regrade_final_grades()
line 2035 of /lib/grade/grade_item.php: call to grade_regrade_final_grades()
line 290 of /lib/gradelib.php: call to grade_item->update_raw_grade()
line 266 of /mod/attendance/locallib.php: call to grade_update()
line 1011 of /mod/attendance/classes/structure.php: call to attendance_update_users_grade()
line 724 of /mod/attendance/classes/structure.php: call to mod_attendance_structure->update_users_grade()
line 63 of /mod/attendance/take.php: call to mod_attendance_structure->take_from_form_data()
------------------------------------------------------------------------------------------------------------
At top of screen I get this debugging dump:
Notice: Trying to get property of non-object in /home1/wrfrcom/public_html/moodle2/lib/grade/grade_item.php on line 2499
This page should be using theme chameleon which cannot be initialised. Nor can the site theme chameleon. Falling back to boost
line 711 of /lib/outputlib.php: call to debugging()
line 1553 of /lib/pagelib.php: call to theme_config::load()
line 1892 of /lib/setuplib.php: call to moodle_page->initialise_theme_and_output()
line 386 of /lib/setuplib.php: call to bootstrap_renderer->__call()
line ? of unknownfile: call to default_exception_handler()
------------------------------------------------------------------------------------------------------------
Then the actual error dump is:
An error occurred while processing your responses (Invalid course module ID (SELECT id,course FROM {course_modules} WHERE id IS NULL [array ])). Click continue to return to the page you were on and try again.
More information about this error
Debug info: SELECT id,course FROM {course_modules} WHERE id IS NULL
[array (
)]
Error code: errorprocessingresponses
Stack trace:
line 2240 of /mod/quiz/attemptlib.php: moodle_exception thrown
line 89 of /mod/quiz/processattempt.php: call to quiz_attempt->process_attempt()
------------------------------------------------------------------------------------------------------------
Thanks in advance,
Bass