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

mathslib used by gradebook incorrectly evaluating expressions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.8
    • Fix Version/s: 2.1
    • Component/s: Gradebook, Libraries
    • Labels:
      None
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE

      Description

      There are errors in maths expression evaluation by mathslib as used by gradebook.

      'pi() * 5', or pi() followed by any over operation generates an error when trying to convert to postfix. pi is the only user defined function with no operands, seems to be an error in the interpreter here.

      Also '-8*(5/2)^2' is evaluated as -18 instead of -50.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jamiesensei Jamie Pratt
                Reporter:
                jamiesensei Jamie Pratt
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Nobody
                Participants:
                Component watchers:
                David Monllaó, Víctor Déniz Falcón, David Monllaó, Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  1/Jul/11