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

calendar api / numerical validation improvements with leading zeros

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9
    • Fix Version/s: None
    • Component/s: Calendar, General
    • Labels:
      None
    • Affected Branches:
      MOODLE_39_STABLE

      Description

      This has been created after applying an immediate fix @ MDL-67598

      Basically it's about how numerical (int, float...) parameters are handled by calendar API and, by extension, globally. More specifically when the numerical values have leading zeros.

      There are various approaches to solve / improve current situation, and they are NOT mutually exclusive.

      A) Modify the calendar API internals to better support passed params with leading zeros. Cast within the functions body.

      B) Modify the calendar API applying for more type-hinted params that will perform the correct implicit casting.

      C) Modify clean_param() / validate_param() to globally support the leading zeros case in numerical types. There is a proposed patch applying for this from Andrew Nicols .

      Ciao

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated: