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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6.3, 2.7.1
    • 2.6.4, 2.7.1
    • Set: Dataform
    • None
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • 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

            itamart Itamar Tzadok
            itamart Itamar Tzadok
            Itamar Tzadok Itamar Tzadok
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              14/Jul/14