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

Ease limit on number of students per page in Grader Report imposed by max_input_vars

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 2.3.5, 2.4.2
    • 2.3.1, 2.3.4, 2.4.1
    • Gradebook
    • MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_23_STABLE, MOODLE_24_STABLE
    • MDL-35074_master_2
    • Hide

      Turn up the PHP setting max_input_vars

      Show
      Turn up the PHP setting max_input_vars
    • Hide

      (These testing instructions are largely copied from MDL-26275, with a few changes)

      Note that there are two known issues that you might encounter while testing.
      MDL-32306. Shift tabbing in the grader report isnt quite correct.
      MDL-31036. With quick feedback on you may encounter html tags in student feedback and have to un-override overridden grades twice.

      When the testing instructions say to refresh the grader report this is most safely done by clicking "Grader report" in the navigation breadcrumbs. F5 refreshing should be avoided to avoid accidentally repeating non-ajax actions.

      Go to a course with at least 10 students and at least five gradeable activities (and/or manual grade items). Set an activity to have a numeric grade and make a note of the maximum grade.

      Make sure that your student doesn't already have an overridden grade for the activity. You can un-override a grade by going to the grader report, turning on editing, clicking the edit icon and unchecking the overridden checkbox. You may need to do this twice (MDL-31036).

      Students per page safety net test

      Count the number of grade items (including category/course totals)
      Add or edit max_input_vars in php.ini. php.ini is at /etc/php5/apache2 for me but your location may be different.
      Set max_input_vars to be more than the number of grade items per student but less than twice that number. For example, if you have 6 grade items (including totals), you could set max_input_vars to 10.

      Restart apache and refresh the grader report. You should still see multiple students - up to (max_input_vars-1). You should only get a debug message similar to the following if you have more than (max_input_vars-1) students in the course:

      Reduced maximum students per page from 20 to 10. Consider increasing the PHP setting max_input_vars from 10.

      You may get other PHP warnings and errors because you've set max_input_vars so low as to make Moodle not work. Turn it back up. 1000 is the default. Restart apache.

      Grader report ajax/non-ajax test

      You may want to keep the grader report settings ("Grader report" under "My preferences" at the bottom of the dropdown) available in separate tabs for easy access; the report defaults are a site-wide setting.
      Turn grade_report_enableajax OFF.
      Turn grade_report_showquickfeedback ON.

      Go to the grader report. Clicking in empty space in a student grade cell should do nothing.

      Turn grader report ajax on and refresh the grader report. Now clicking on a cell should display two boxes. The first is for the student's grade. The second is for feedback. Enter something valid in both fields and press enter.

      The grade should change (or appear if there was no previous grade) and the cell background color should change.

      Refresh the grader report and check that the grade and feedback were saved.

      Turn ajax off then turn editing on on the grader report. All the fields will display.

      Click on edit hand/pencil icon in a student grade cell and check that the edit grade page loads after only a single click. You shouldn't have to click it twice.

      Go back to the grader report. Enter a new grade and feedback for your student and click "Update". Check that the grade and feedback were updated.

      Turn ajax on and refresh the grader report. Check that the "Update" button is hidden (may take a few seconds while the JS loads).

      Enter another grade and different feedback and tab to another grade. Refresh the grader report and check that the changes were saved.

      Enter another grade and different feedback and press enter without leaving the feedback field. Refresh the grader report and check that the changes were saved.

      Go to an empty (no grade) grade cell. Enter a grade and tab away. Refresh the grader report and check that the grade was saved.

      Turn off quick feedback and repeat the above.
      Editing mode off, ajax off (nothing happens)
      Editing mode off, ajax on
      Editing mode on, ajax off
      Editing mode on, ajax on

      Choose another grade item that uses a custom scale. Repeat these again.
      Editing mode off, ajax off (nothing happens)
      Editing mode off, ajax on
      Editing mode on, ajax off
      Editing mode on, ajax on

      Show
      (These testing instructions are largely copied from MDL-26275 , with a few changes) Note that there are two known issues that you might encounter while testing. MDL-32306 . Shift tabbing in the grader report isnt quite correct. MDL-31036 . With quick feedback on you may encounter html tags in student feedback and have to un-override overridden grades twice. When the testing instructions say to refresh the grader report this is most safely done by clicking "Grader report" in the navigation breadcrumbs. F5 refreshing should be avoided to avoid accidentally repeating non-ajax actions. Go to a course with at least 10 students and at least five gradeable activities (and/or manual grade items). Set an activity to have a numeric grade and make a note of the maximum grade. Make sure that your student doesn't already have an overridden grade for the activity. You can un-override a grade by going to the grader report, turning on editing, clicking the edit icon and unchecking the overridden checkbox. You may need to do this twice ( MDL-31036 ). Students per page safety net test Count the number of grade items (including category/course totals) Add or edit max_input_vars in php.ini. php.ini is at /etc/php5/apache2 for me but your location may be different. Set max_input_vars to be more than the number of grade items per student but less than twice that number. For example, if you have 6 grade items (including totals), you could set max_input_vars to 10. Restart apache and refresh the grader report. You should still see multiple students - up to (max_input_vars-1). You should only get a debug message similar to the following if you have more than (max_input_vars-1) students in the course: Reduced maximum students per page from 20 to 10. Consider increasing the PHP setting max_input_vars from 10. You may get other PHP warnings and errors because you've set max_input_vars so low as to make Moodle not work. Turn it back up. 1000 is the default. Restart apache. Grader report ajax/non-ajax test You may want to keep the grader report settings ("Grader report" under "My preferences" at the bottom of the dropdown) available in separate tabs for easy access; the report defaults are a site-wide setting. Turn grade_report_enableajax OFF. Turn grade_report_showquickfeedback ON. Go to the grader report. Clicking in empty space in a student grade cell should do nothing. Turn grader report ajax on and refresh the grader report. Now clicking on a cell should display two boxes. The first is for the student's grade. The second is for feedback. Enter something valid in both fields and press enter. The grade should change (or appear if there was no previous grade) and the cell background color should change. Refresh the grader report and check that the grade and feedback were saved. Turn ajax off then turn editing on on the grader report. All the fields will display. Click on edit hand/pencil icon in a student grade cell and check that the edit grade page loads after only a single click. You shouldn't have to click it twice. Go back to the grader report. Enter a new grade and feedback for your student and click "Update". Check that the grade and feedback were updated. Turn ajax on and refresh the grader report. Check that the "Update" button is hidden (may take a few seconds while the JS loads). Enter another grade and different feedback and tab to another grade. Refresh the grader report and check that the changes were saved. Enter another grade and different feedback and press enter without leaving the feedback field. Refresh the grader report and check that the changes were saved. Go to an empty (no grade) grade cell. Enter a grade and tab away. Refresh the grader report and check that the grade was saved. Turn off quick feedback and repeat the above. Editing mode off, ajax off (nothing happens) Editing mode off, ajax on Editing mode on, ajax off Editing mode on, ajax on Choose another grade item that uses a custom scale. Repeat these again. Editing mode off, ajax off (nothing happens) Editing mode off, ajax on Editing mode on, ajax off Editing mode on, ajax on

      It would seem that the workaround for max_input_vars (MDL-26275) may be causing some confusion, as it manifests as Moodle not paying attention to the page size setting: http://moodle.org/mod/forum/discuss.php?d=209680

      The documentation for max_input_vars states that the limit "applies only to each nesting level of a multi-dimensional input array" (http://www.php.net/manual/en/info.configuration.php#ini.max-input-vars). Rather than limiting the number of students displayed per page, we can turn the grader report fields into arrays (they're currently all top-level form fields, i.e. elements of the top-level array) - thereby removing the need to limit the number of students displayed per page (or at least, increasing it hugely - it might still be sensible to keep it there, but make it count only top-level fields).

            paul.n Paul Nicholls
            paul.n Paul Nicholls
            Andrew Davis Andrew Davis
            Dan Poltawski Dan Poltawski
            Andrew Davis Andrew Davis
            Votes:
            2 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

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