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

Calculated question is not calculating correct when there is a double negative

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      Linux
      Apache
      atabase mysql versie 3.23 is vereist en je gebruikt nu versie 4.1.20 OK
      php versie 4.1.0 is vereist en je gebruikt nu versie 4.3.9 OK

      Mysql
    • Affected Branches:
      MOODLE_16_STABLE

      Description

      When calculated questions are used and a variable is negative (In this case

      {c} then the outcome is wrong, in our case 0

      70/10- 3= 7-3=7+3=10
      {a} / {b} - {c}

      = ?

      The result becomes 0

      All positive variables calculate correct

      When brackets are place around the (

      {a}

      /

      {b}

      ) -

      {c}

      = ?

      the calculation is correct

        Attachments

          Activity

            People

            Assignee:
            ppichet Pierre Pichet
            Reporter:
            friends1234 frank weissman
            Tester:
            Nobody
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: