An error occurred while processing your responses (Invalid course module ID). Click continue to return to the page you were on and try again
Any help? Thanks.
Moving to Quiz forum.... but I suggest switching on Debugging and doing it again. You should get a much fuller error message.
Was this quiz imported or copied from another quiz?
I'm not sure of your question. I made the quiz out of my database of questions and posted it as an activity .
I would try recreating it maybe - sounds like something maybe corrupted during the upgrade.
The odd thing about that message is that it is not very specifically linked to the inner workings of the quiz. The course-module ID is the generic identifier that Moodle uses to indentify courses. Every activity has one. At some point, the user must be getting redirected to a URL that contains the wrong cmid, but I can't think how that would happen.
If you could temporarily set Debugging to DEVELOPER level, then the error message would include a full stack trace, which might give more clues.
Hey Tim,
I was having the same problem so I followed your advice and turned developer debugging mode on.
Here is the full report:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Notice: Trying to get property of non-object in /home1/shortcx0/public_html/main/lib/grade/grade_item.php on line 2499
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.
Debug info: SELECT id,course FROM {course_modules} WHERE id IS NULL
[array (
)]
Error code: errorprocessingresponses
Stack trace:
I also noticed that when I tried submitting the Quiz on an account that was already enrolled into the course before we upgraded to Moodle 3.6.2 the error did not occur. Because of this, I do not think the course could be corrupted.
Any help would be appreciated!
UPDATE:
Ok, so I have tried changing all of the possible settings I could change within the assignment where the error occurred, and still cannot find a reason why some assignments are getting this error and some not.
Although, this error has magically just "disappeared" and the only significant reason I see why is the fact that the account has been enrolled into the course for 12 hours now. I don't know if the 12 hours is just a coincidence but it is suspicious.
I tested it again and any new accounts I create still get the same error message. Even when I created a brand new assignment from scratch, the same error shows up.
Could time be effecting this error?
Ok, I solved the problem. I don't know if was having the same problem as the OP but I had a deleted/hidden assignment still floating around in the same grade book category as the non-working assignments were in. Once I moved the assignments into a new category it resolved the problem.
Good detective work. I am glad you have solved it.
However, it might be worth reporting this to the Tracker. The code where the original error came from was new in Moodle 3.6: https://github.com/moodle/moodle/blame/master/lib/grade/grade_item.php#L2496. That is related to MDL-27520, so it may be that something in that change is not working robustly on upgraded Moodle sites. It would be worth reporting that.
(I don't know anything about those changes myself. I just found this from the git history.)