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

Calculated questions are calculating answers irrespective of number of decimals set.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.6.1, 1.6.2
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      LAMP
    • Affected Branches:
      MOODLE_16_STABLE

      Description

      Debra and I had a conversation at http://moodle.org/mod/forum/discuss.php?d=55849
      Debra had encountered this:
      <i>I created a calculated question. The student answered 1.59, which was correct and the feedback indicated the correct answer was 1.59 but still scored the student 0/2 pts. I checked to make sure the student did not put in any extra spaces or syntax. I edited the question and sure enough 1.59 is listed as a correct answer.</i>

      I was able to duplicate the problem successfully

      I have discovered what is happening.

      formula is 6.375/

      {a}
      your {a}

      are various values fore.g. 4

      Since you had mentioned: correct answer should have '2' decimal figures, the dataset has calculated the answers only upto 2 decimal figures...thus 1.59 is one of the answers in the dataset

      The bug is: when you fill in the answer while attempting the question, it is not limiting itself to 2 decimals.
      so try filling the follwing answers:
      1.59---> incorrect
      1.593---> incorrect
      1.5937---> incorrect
      1.59375---> Correct

      Surprise!! surprise!!

      Want more surprise?
      Here you go===> this behaviour does not change even if you change the setting of 2 decimals to 3 significant figures.

      Therefore, the bug is=> the decimal/significant figure option is affecting only the dataset for wildcard replacement but fails to be applied when answers filled in are matched with possible answers.

      To take it further
      if you click on 'fill with correct', it fills 1.59 only (taking it from dataset)
      but if you click 'submit' then, it says 'incorrect'.

      HOWEVER

      once i set the settings as shown below, the preview started accepting 1.59 as correct. this was once decimal was set to 5 and tolerance to 0.01

        Attachments

        1. try.JPG
          try.JPG
          47 kB
        2. try2.JPG
          try2.JPG
          57 kB
        3. try3.JPG
          try3.JPG
          23 kB

          Issue Links

            Activity

              People

              Assignee:
              ppichet Pierre Pichet
              Reporter:
              allbhatias Dr S Bhatia
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: