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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.7.7, 3.8.4, 3.9.1
    • Fix Version/s: 3.8.5, 3.9.2
    • Component/s: Forms Library
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            timhunt Tim Hunt
            Peer reviewer:
            Sam Marshall
            Integrator:
            Andrew Nicols
            Tester:
            Janelle Barcega
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              14/Sep/20

                Time Tracking

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