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

Duration form fields will accept fractional numbers of seconds, which cause DB errors

XMLWordPrintable

    • MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_38_STABLE, MOODLE_39_STABLE
    • Hide
      1. On a Moodle install using postgres.
      2. Add a quiz to a course.
      3. Try to set the time-limit to 9.3 seconds.
      4. Verify there is no error when you click 'Save and display'.
      5. Edit the quiz settings again.
      6. Verify that the Time limit was saved as 9 seconds.
      Show
      On a Moodle install using postgres. Add a quiz to a course. Try to set the time-limit to 9.3 seconds. Verify there is no error when you click 'Save and display'. Edit the quiz settings again. Verify that the Time limit was saved as 9 seconds.

      Steps to reproduce:

      1. On a Moodle site using Postgres.
      2. Create a quiz, and try to set the time limit to 9.3 seconds.

      Actual result: when you try to save the form, you get a database error 'invalid input syntax for integer: "9.3"'.

      Expected result: Either time is just saved as 9 seconds (I think this is the better option - anyone who thinks a web app working over the internet can be accurate to more than 1s is just wrong); or form validation error.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Sam Marshall Sam Marshall
            Andrew Lyons Andrew Lyons
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 33 minutes
                1h 33m

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