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

userform_child_item_allowed_dynamic are wrong

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.2
    • Fix Version/s: 3.0.7, 3.1.3
    • Component/s: Module: Survey Pro
    • Labels:
      None
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE

      Description

      Deep problem!
      Almost all the 6 userform_child_item_allowed_dynamic methods are bad!
      Luckily the methods used by boolean and integer (that are the most commonly used) work fine but the problem is still very relevant because those methods are responsible for the evaluation of the input provided by the user.

      This is the story.
      Parent and child in the same page.
      Provide the parent with the answer allowing the child.
      The child becomes enabled.
      Provide an answer to the child.
      Return to parent and change your answer.

      At submit time mform submits the answer for the child too!! GRRRR
      So, the method userform_child_item_allowed_dynamic verify if the submission was expected and, if needed, it drops it.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Nov/16