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

Quiz manual grading: page size preference can get stuck at 0

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • MDL-71126-master
    • Hide

      Initial setup

      1. Create a course.
      2. Create a teacher and a student account.
      3. Create a Quiz activity.
      4. Create an Essay question and add it to the created Quiz activity.

      Testing

      1. Log in as a student.
      2. Attempt the Quiz and submit the answer.
      3. Log in as a teacher.
      4. Go to the Manual grading report of the Quiz.
      5. Click on the "grade" link in the report table.
      6. Set the Questions per page value to 0 and press "Change options".
      7. Verify that you will see an error message: You must enter a number not starting with a 0 here.
      8. Set the Questions per page value to 1 and Press "Change options".
      9. Verify that you will not see an error message: You must enter a number not starting with a 0 here.
      10. Verify that in the address bar of the browser, you will see something like: &pagesize=1.
      11. Change the &pagesize=1 to &pagesize=0 and press Enter.
      12. Verify that you will see an exception error: Invalid page size.
      13. Remove the &pagesize=0 and press Enter.
      14. Verify that the page will load successfully.
      15. Verify that the Questions per page value is 1.

       Also try eintering other non-standard values, like 'frog' or -7.

      Show
      Initial setup Create a course. Create a teacher and a student account. Create a Quiz activity. Create an Essay question and add it to the created Quiz activity. Testing Log in as a student. Attempt the Quiz and submit the answer. Log in as a teacher. Go to the Manual grading report of the Quiz. Click on the "grade" link in the report table. Set the Questions per page value to 0 and press "Change options". Verify that you will see an error message:  You must enter a number not starting with a 0 here . Set the Questions per page value to 1 and Press "Change options". Verify that you will not see an error message:  You must enter a number not starting with a 0 here . Verify that in the address bar of the browser, you will see something like:  &pagesize=1 . Change the  &pagesize=1 to  &pagesize=0 and press Enter. Verify that you will see an exception error:  Invalid page size . Remove the  &pagesize=0 and press Enter. Verify that the page will load successfully. Verify that the Questions per page value is 1 .  Also try eintering other non-standard values, like 'frog' or -7.

      When manually grading a quiz, the "Questions per page" can be set to 0 and produces a coding error. This is saved as a user preference with the key "quiz_grading_pagesize" and brakes grading for this user for the whole site.

      The input for this form does not seem to be validated.

       

      This might be related to MDL-3953.

      Steps to reproduce:

      1. Create a course.
      2. Create a quiz activity.
      3. Add an "Essay" question.
      4. Login as a student, and submit the quiz.
      5. Login as teacher,  go to Manual grading screen.
      6. Press "grade" link to make a grade.
      7. Set 0 in "Questions per page" in "Options", and press "Change options".
      8. The error "Coding error detected, it must be fixed by a programmer: moodle_database::get_in_or_equal() does not accept empty arrays" is shown, and the user cannot manual grade any more.

            huongn@moodle.com Huong Nguyen
            Daniel Ziegenberg Daniel Ziegenberg
            Tim Hunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 4 hours, 50 minutes
                1d 4h 50m

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