Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-5221

View calculations display the raw formula when refer to fields without content.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.3, 2.7.1
    • Fix Version/s: 2.6.4, 2.7.1
    • Component/s: Set: Dataform
    • Labels:
      None
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE

      Description

      Given a dataform with duration field and a formula that divides the field seconds value by 3600.

      Add a new entry. The entry form display the formula instead of nothing or 0.

      This can be solved by replacing empty content with 0 when processing the formula.

      Another problem is with the [[entryid]] pattern that is not resolved in new entries. When this pattern is used for a formula id so as to aggregate in the entry level, the calculation fails and the formula is shown.

      A temporary and hacky solution for this problem is to remove unresolved [[entryid]] patterns before processing the calculation.

        Attachments

          Activity

            People

            • Assignee:
              itamart Itamar Tzadok
              Reporter:
              itamart Itamar Tzadok
              Tester:
              Itamar Tzadok
              Participants:
              Component watchers:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Jul/14