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

Sub-optimal error message on course/modedit.php

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.7, 2.9.1, 3.0
    • Fix Version/s: 2.8.8, 2.9.2
    • Component/s: Assignment
    • Labels:
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      1. Create a course.
      2. Create an assignment.
      3. Change the "Maximum points" value to be less than one.
      4. Submit the form.
      5. Make sure you receive an error message that says "Invalid Grade Value. This must be an integer between 1 and 300."
      6. Change the "Maximum points" value to be greater than 300.
      7. Submit the form.
      8. Make sure you receive an error message that says "Invalid Grade Value. This must be an integer between 1 and 300."
      9. Change the "Maximum points" value to be between 1 and 300.
      10. Submit the form.
      11. Make sure the form submission is accepted and you do not receive any error message.

      Show
      1. Create a course. 2. Create an assignment. 3. Change the "Maximum points" value to be less than one. 4. Submit the form. 5. Make sure you receive an error message that says "Invalid Grade Value. This must be an integer between 1 and 300." 6. Change the "Maximum points" value to be greater than 300. 7. Submit the form. 8. Make sure you receive an error message that says "Invalid Grade Value. This must be an integer between 1 and 300." 9. Change the "Maximum points" value to be between 1 and 300. 10. Submit the form. 11. Make sure the form submission is accepted and you do not receive any error message.
    • Workaround:
      Hide

      Do not attempt to set the "Maximum points" value to zero. Instead, make sure it is always greater than zero and less than 301.

      Show
      Do not attempt to set the "Maximum points" value to zero. Instead, make sure it is always greater than zero and less than 301.
    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull Master Branch:
      mdl-50963

      Description

      When you create or edit an assignment and make changes to the "Grade" section (specifically the "Maximum points"), if you attempt to give a maximum point value of zero, the form submission is rejected and you receive this message:

      Invalid Grade Value. This must be an integer between 0 and 300
      

      Now, if you instead give a maximum point value of 300, the form submission will be accepted. I propose changing the message to be:

      Invalid Grade Value. This must be an integer between 1 and 300.
      

      This better matches how people think when you use the word "between" and also makes valid the given minimum and maximum values.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Sep/15