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

MoodleQuiz: Maximum grade cannot handle spaces.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 3.3.4, 3.4.1
    • 3.3.1
    • Quiz
    • MOODLE_33_STABLE
    • MOODLE_33_STABLE, MOODLE_34_STABLE
    • 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.

    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

            timhunt Tim Hunt
            oucnelson Chris Nelson
            Ankit Agarwal Ankit Agarwal
            David Monllaó David Monllaó
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Clockify

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