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

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 1.9.16, 2.0.7, 2.1, 2.2
    • General, Gradebook
    • None
    • PHP 5.3.9 onwards.
    • MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • 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.

      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?

            moodle.com Moodle HQ
            markn Mark Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.