A required parameter (cmid) was missing

A required parameter (cmid) was missing

Karl Zander -
回帖数:3

Moodle 2.5.1

A password protected, timed quiz.  4 hours.  Mostly multiple choice.  

2 test takers for have encountered this error.


"A required parameter (cmid) was missing".

They get stuck at this point and can not go on.   We have not found much information about the error and what it means.  

The Apache server logs show this

Fri Dec 19 08:57:31 2014] [error] [client 80.254.xxx.xxx] Default exception handler: A required parameter (cmid) was missing Debug: \nError code: missingparam\n* line 476 of /lib/setuplib.php: moodle_exception thrown\n* line 532 of /lib/moodlelib.php: call to print_error()\n* line 33 of /mod/quiz/startattempt.php: call to required_param()\n


This quiz has worked successfully in the past.  Any clues about what we are looking at?


Thank you.

--Karl

回复Karl Zander

Re: A required parameter (cmid) was missing

Tim Hunt -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像

What is your session time-out set to? Let me guess, it is less than 4 hours.

Also, are all your quiz questions on one page?

回复Tim Hunt

Re: A required parameter (cmid) was missing

Karl Zander -

Yes, session timeout was set at 2 hrs.  We did increase it to 4 hrs.


100 questions.  Multiple choice and true/false.   All the questions are one page.  That's  not a good design choice and we will talk to the instructor about that.   Would all the questions on one page cause Moodle to have trouble recording the responses?  


We also noticed in the logs that the ip address of the test taker changed while taking the  test.  Moodle doesn't care about the ip address does it?   We thought a login as tracked through a cookie.

回复Karl Zander

Re: A required parameter (cmid) was missing

Tim Hunt -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像

Yes, 100 questions on the same page is a really bad design. (Slightly less bad if you have Autosave turned on. https://docs.moodle.org/28/en/Quiz_settings#Site_administration_settings ). However, it should not be a problem for Moodle, it is just that nothing is saved until the whole quiz is submitted at the end. If questions are on separate pages, everything is saved whenever the student moves to a new page, which limits how much you can lose.

Moodle does not care if the IP address changes during a session. As you say, it is just a cookie.