-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.2.1
-
None
-
PHP 5.4RC4
-
MOODLE_22_STABLE
-
-
When updating the grades using the grader report with an input field count (approx. users x grade items x 2 x 2(with quick feedback)) larger than the PHP max_input_vars configuration value, PHP kills the grade submission with a fatal error. The end user usually sees a blank page if PHP error reporting is turn off and the newly "entered" grades are not submitted.
The max_input_vars configuration value is available since PHP 5.3.9 with a default value of 1000. Due to the recent hash table vulnerability attack, limiting the parameter count has been suggested as one of the security measures. This means it is more likely to see future PHP setups with the default 1000 value or even a smaller value.
Here are few ways to detect/fix this issue in Moodle, ranging from easy to complicated:
1. detect (ini_get('max_input_vars')) and suggest a larger max_input_vars value setting as part of the install/upgrade check.
2. detect, block, and present a message with suggested fixes(increase max_input_vars, reduce number of students per page) when user tries to turn on editing mode on the grader report page.
3. dynamically detect and present a lower number of students per page for grader report at editing according to number of grade items, effectively ignoring the "students-per-page" setting.
4. change the way grades, or any other modules with mass input fields, are submitted to reduce the total number of input params, such as using input arrays.