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

Form change checker does not warn after adding a repeated element

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.9.4, 3.10.1
    • Forms Library
    • MOODLE_310_STABLE, MOODLE_39_STABLE

      Given I am creating a new multipe choice quesetion
      And I set the "Question name" to "Example"
      When I press "Blanks for 3 more choices"
      And I follow "Site home"
      Then I should see the form change checker
      However I am navigated away from the page

      We need to extend the check in lib/formslib.php::startForm() to add $this->isSubmitted(), i.e.

      if ($this->is_dirty() }} $this->isSubmitted()) {
          $PAGE->requires->js_call_amd('core_form/changechecker', 'markFormAsDirtyById', [$formid]);
      }
      

      This will ensure that a form which was submitted, but rejected, is marked as dirty.

            Unassigned Unassigned
            dobedobedoh Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.