Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-31764

Unable to save a large number of input fields from PHP 5.3.9 onwards, eg. the grader report

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.9.16, 2.0.7, 2.1, 2.2
    • Fix Version/s: None
    • Component/s: General, Gradebook
    • Labels:
      None
    • Environment:
      PHP 5.3.9 onwards.
    • Testing Instructions:
      Hide

      1. Ensure you are running PHP 5.3.9 onwards
      2. Enrol 20+ students into a course.
      3. Create 25+ assignments in that course.
      4. Visit the grader report (eg. <yoursite>/grade/report/grader/index.php?id=<courseid>)
      5. Add a value in the last field (bottom row, last column).
      6. Save
      7. See value has not changed.

      Show
      1. Ensure you are running PHP 5.3.9 onwards 2. Enrol 20+ students into a course. 3. Create 25+ assignments in that course. 4. Visit the grader report (eg. <yoursite>/grade/report/grader/index.php?id=<courseid>) 5. Add a value in the last field (bottom row, last column). 6. Save 7. See value has not changed.
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE

      Description

      PHP version 5.3.9 introduced a new PHP setting called max_input_vars, which by default is set to 1000 if not specified in the PHP settings. This setting determines how many fields are submitted, which can cause an issue when you have more than 1000 fields on a form. This is plausible on large sites when using the grader report. All you need is 20 students, with more than 25 gradeable items. This will generate more than 500 fields, this combined with the hidden input fields that store the old grade can max over 1000, meaning that not all the data is saved on submission.

      This isn't a bug in Moodle, and will rarely be triggered, as most users would not grade items on this screen, just thought I would bring it to your attention.

      Maybe a warning message could be introduced advising them to increase this value for their site, or the table could be split if the input fields max out at 1000 if this value is set, or just ignore it?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              moodle.com moodle.com
              Reporter:
              markn Mark Nelson
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: