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

MoodleQuiz: Maximum grade cannot handle spaces.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.1
    • Fix Version/s: 3.3.4, 3.4.1
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a quiz.
      2. Go to the 'Edit quiz' page.
      3. Try changing Maximum mark at the top to a list of empty spaces
      4. Your change should be silently ignored. The existing value should be retained.
      5. Repeat with some other values.
      6. Try changing the maximum value to ' 7 '.
      7. The value should be set to 7.00.
      8. Change the course language to French (or similar).
      9. Set the quiz maximum value to ' 10,5 '.
      10. The value should be set to 10.5 in the database, displayed as 10,5 on-screen.
      Show
      Create a quiz. Go to the 'Edit quiz' page. Try changing Maximum mark at the top to a list of empty spaces Your change should be silently ignored. The existing value should be retained. Repeat with some other values. Try changing the maximum value to ' 7 '. The value should be set to 7.00. Change the course language to French (or similar). Set the quiz maximum value to ' 10,5 '. The value should be set to 10.5 in the database, displayed as 10,5 on-screen.
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull from Repository:
    • Pull 3.4 Branch:
    • Pull Master Branch:

      Description

      Description
      MoodleQuiz bug found in v3.3.1: If you enter 'nothing' by using the space bar in 'Maximum grade' in MoodleQuiz on the Editing quiz page, and then press 'Save', the page will return the error " Error writing to database".
       
      Not a big issue as an admin or manager is unlikely to do this, but would expect an "Error, numerical value required" to pop up, or for a null value to be translated to '0.00'.
       
      Step to reproduce # Login as Admin/Manager to course.

      1. Create/Add new MoodleQuiz activity.
      2. on Quiz page, click Edit Quiz.
      3. on Edit quiz, delete value default on Maximum grade field, and add a space or spaces using the keyboard space bar.
      1. Save.
      2. Observe result: error "Error writing to database".

       
       

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Jan/18