Required parameter "attempt" is missing

Required parameter "attempt" is missing

Ralph Ballier -
Кількість відповідей: 11
Фото Particularly helpful Moodlers

Hello,

during a multiple choice quiz my students get the message

"Required parameter "attempt" is missing"

("Notwendiger Parameter "attempt" fehlt)

Then they are kicking out of the course.

I use Moodle 2.2.1+ (Build: 20120127)

What can I do?

Ralph

 

У відповідь на Ralph Ballier

Re: Required parameter "attempt" is missing

Tim Hunt -
Фото Core developers Фото Documentation writers Фото Particularly helpful Moodlers Фото Peer reviewers Фото Plugin developers

Let me guess. You are using an authentication plugin that does single-sign-on.

Which form of authentication are you using? and which version of Moodle?

У відповідь на Tim Hunt

Re: Required parameter "attempt" is missing

Ralph Ballier -
Фото Particularly helpful Moodlers

I use

manually accounts and LDAP.

The accounts for students test I had upladed with bulkupload.

Which version of Moodle: look in my first article.

Ralph

У відповідь на Ralph Ballier

Re: Required parameter "attempt" is missing

Tim Hunt -
Фото Core developers Фото Documentation writers Фото Particularly helpful Moodlers Фото Peer reviewers Фото Plugin developers

Well, what is normally going on when you get these symptoms is:

  1. Student is looking at a page of the quiz.
  2. PHP session times out.
  3. Student clicks next, or submits, or something.
  4. Becaues the session has timed-out, Moodle redirects them to the login page.
  5. Your single-sign-on system automatically logs the student back in, establishing a new PHP session.
  6. Then the student is redirected back to the page they were on.
  7. However, becuase the submission at step 3. was a POST request, the redirects at step 4. and 6. cause the submitted data to be lost. Hence you get the error about required data being missing.

If you don't have a single-sign-on system, then the process stops at step 4. showing the student the log-in form. This is much easier to understand.

Anyway the way to fix this is to make sure that you PHP session time-out is long enough.

У відповідь на Tim Hunt

Re: Required parameter "attempt" is missing

Ali Hastie -

Hi

We are receiving the exact same error with some students, especially when they go through the quiz fairly quickly. We only use manual authentication with cohort synch for enrolments.

We also increased (doubled, but cant remember exact figure off hand) PHP session-time. Does not happen all the time though and not all students receive this error.

Using Moodle 2.2.2+ PHP V5.3.2

У відповідь на Ali Hastie

Re: Required parameter "attempt" is missing

Ali Hastie -

Hi

We are still receiving the required parameter error within Moodle 2.2.2+ here is what I found within Apache error logs:

 

Default exception handler: A required parameter (attempt) was missing Debug: \n* line 435 of /lib/setuplib.php: moodle_exception thrown\n* line 494 of /lib/moodlelib.php: call to print_error()\n* line 40 of /mod/quiz/processattempt.php: call to required_param()\n, referer: http://lta.barony.ac.uk/mod/quiz/attempt.php?attempt=2448&page=3

Any help much appreciated,

Ali.

У відповідь на Ali Hastie

Re: Required parameter "attempt" is missing

Ali Hastie -

UPDATE:

We seem to have this error fixed by amending the 'session.gc_maxlifetime = 7200' (2 hours) within the php.ini file, again. We did not amend the session.cookie_lifetime
= 0’
setting we left that at zero.

The students were not being logged out, they would receive this error during a quiz and would be sent to the homepage still being logged in. Our quizzes has a timer set to 1 hour for each quiz.

Hope it helps others who may have the same error.

Ali

У відповідь на Ali Hastie

Re: Required parameter "attempt" is missing

Howard Miller -
Фото Core developers Фото Documentation writers Фото Particularly helpful Moodlers Фото Peer reviewers Фото Plugin developers
Hi Ali,

I'm intrigued to know what got you from one to the other?
У відповідь на Howard Miller

Re: Required parameter "attempt" is missing

Matthew Lowe -

I'm just going to chime to say that we have experienced the exact same error and behaviour of being kicked out of the course on iPads.

It seems that it is being caused by the 'Privacy & Security' settings for safari having 'Block Cookies' being set to either 'Always' or 'From third parties and advertisers'.

Changing the setting to 'Never' fixes the issue.


У відповідь на Matthew Lowe

Re: Required parameter "attempt" is missing

Tim Hunt -
Фото Core developers Фото Documentation writers Фото Particularly helpful Moodlers Фото Peer reviewers Фото Plugin developers

Moodle can't possibly work with Block cookies: Always.

Block Cookies: From third parties and advertisers should not prevent Moodle from working. Your observation suggests that something quite surprising is going on. If you have time to investigate, it would be interesting to know which cookies are getting blocked, but it may not be worth the while to investigate.

У відповідь на Matthew Lowe

Re: Required parameter "attempt" is missing

Bill McNamara -

We are experiencing this same issue despite upping the session.gc_maxlifetime to 7200.  Our proxy/ISP folks haven't figured anything out and our Moodle provider is stumped as well.  It only happens sporadically while students are taking Moodle quizzes.  Our users for the exams are all on IE 9 (gov't agency).  Do you know of specific firewall changes that alleviated the problem?  Thanks, Bill