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

Question engine: sometimes step data is a string, and sometimes an int

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.7
    • 3.6.3
    • Questions

      If, as in, qtype_multichoice, get_expected_data() says that some expected data is PARAM_INT, then when handling the request where the data is submitted, the value will be in int.

      However, later, once the data has been saved to the database, and loaded back (for example when re-grading the attempt) it will be treated as a string.

      If question types are using === to compare resonses, this could lead to very subtle bugs.

      It would be better if the value was consistently a string always.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Simey Lameze Simey Lameze
            Andrew Lyons Andrew Lyons
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 45 minutes
                45m

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