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

Calculated qtype comment on datasetitems should follow formatting rules

XMLWordPrintable

    • MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • Hide
      • Go to any question bank
      • Create a new 'Calculated' question
      • Set the following fields:
        question name: mdl47224
        question text: mdl47224
        answer 1 formula = ( {x}*0.001)*{y}
        grade: 100%
        answer display: 3 significant figures
        * click save changes
        * click next page
        * Set the following fields:
        wild card {x}

        : 0.240
        range min: 0.15
        range max: 0.45
        decimal places: 3
        distribution: uniform

      wild card

      {y}

      : 84.2
      range min: 20
      range max: 100
      decimal places: 1
      distribution: uniform

      tolerance: 0
      correct answer shows: 3
      format: significant figures

      • click update the answers tolerance parameters

      Expected: In the answers tolerance parameters section, beneath the correct answer (0.0202), it should say "Min: 0.0202 — Max: 0.0202"

      Actual: Currently it shows ERROR correct answer out of range, with a range of: "Min: 0.020208 — Max: 0.020208"

      Which is wrong as the correct answer is only to 3 significant figures, not 5.

      Show
      Go to any question bank Create a new 'Calculated' question Set the following fields: question name: mdl47224 question text: mdl47224 answer 1 formula = ( {x}*0.001)*{y} grade: 100% answer display: 3 significant figures * click save changes * click next page * Set the following fields: wild card {x} : 0.240 range min: 0.15 range max: 0.45 decimal places: 3 distribution: uniform wild card {y} : 84.2 range min: 20 range max: 100 decimal places: 1 distribution: uniform tolerance: 0 correct answer shows: 3 format: significant figures click update the answers tolerance parameters Expected: In the answers tolerance parameters section, beneath the correct answer (0.0202), it should say "Min: 0.0202 — Max: 0.0202" Actual: Currently it shows ERROR correct answer out of range, with a range of: "Min: 0.020208 — Max: 0.020208" Which is wrong as the correct answer is only to 3 significant figures, not 5.

      So thanks to MDL-31680 - calculated question types now correctly display the correct number of significant figures for wildcards.

      One more place that seems to need to obey the length/format rules is the min and max values shown in the "Answers tolerance parameters" section.

      Example:
      (

      {x}

      0.001)

      {y}

      with x=0.240 and y = 84.2 and 3 signficant figures

      (0.240*0.001)*84.2 = 0.0202
      For a tolerance of 0, the min/max would both be 0.202. Instead we currently get: 0.020208. Which shows up as an error, because the min/max isn't having the length/format rules applied to it.

        1. mdl47224fix.png
          mdl47224fix.png
          21 kB
        2. MDL-47224.jpg
          MDL-47224.jpg
          94 kB
        3. download.jpg
          download.jpg
          19 kB

            aolley Adam Olley
            aolley Adam Olley
            Tim Hunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Frédéric Massart Frédéric Massart
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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