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

Adding a required parameter to the init function in basewidget.js breaks backwards compatibility

XMLWordPrintable

    • MOODLE_402_STABLE
    • MOODLE_402_STABLE
    • MDL-77889-master
    • Hide

      testing

      1. Install the following local plugin https://github.com/abgreeve/local_gradeselectortest on a Moodle 4.1 branch.
      2. Go to a course and in the more menu of the secondary navigation click "Selector test"
      3. Click the selector "Select an item" and select an item
      4. The page should refresh and there should be a message that says "Item {1}was selected" where 1 can change depending on the item selected.
      5. Upgrade to current master
      6. Repeat steps 2 - 4
        • Expected result: Everything works as it did in Moodle 4.1
      7. Repeat the testing on MDL-76246

       

      Show
      testing Install the following local plugin https://github.com/abgreeve/local_gradeselectortest on a Moodle 4.1 branch. Go to a course and in the more menu of the secondary navigation click "Selector test" Click the selector "Select an item" and select an item The page should refresh and there should be a message that says "Item {1}was selected" where 1 can change depending on the item selected. Upgrade to current master Repeat steps 2 - 4 Expected result: Everything works as it did in Moodle 4.1 Repeat the testing on MDL-76246  
    • 4
    • Team Alpha - Sprint 4 I1-2023

      MDL-76246 adds a required parameter after an optional one to the init function of grade/amd/src/searchwidget/basewidget.js
      This js class was added in Moodle 4.1 and so we can't just add parameters in this way.

      The registerListenerEvents() function now also looks for data-input-element on line 120 which did not exist in 4.1 and also breaks backwards compatibility.

      Replication steps:

      1. Install the following local plugin https://github.com/abgreeve/local_gradeselectortest on a Moodle 4.1 branch.
      2. Go to a course and in the more menu of the secondary navigation click "Selector test"
      3. Click the selector "Select an item" and select an item
      4. The page should refresh and there should be a message that says "Item {1}

        was selected" where 1 can change depending on the item selected.

      5. Upgrade to current master
      6. Repeat steps 2 - 4
      • Expected result: Everything works as it did in Moodle 4.1
      • Actual result: Errors, and no ability to select an item.

      There is something additional to what I noted above that stop the selection of an item working. Please make sure that the existing functionality is maintained with fixes made on this issue.

        1. additional parameter.png
          12 kB
          Adrian Greeve
        2. MDL-76246_10.png
          34 kB
          Mihail Geshoski
        3. MDL-76246_11.png
          32 kB
          Mihail Geshoski
        4. MDL-76246_6.png
          36 kB
          Mihail Geshoski
        5. MDL-76246_7_8.png
          38 kB
          Mihail Geshoski
        6. MDL-77889_4(4.1).png
          21 kB
          Mihail Geshoski
        7. MDL-77889_4(master).png
          21 kB
          Mihail Geshoski

            rezaie9 Shamim Rezaie
            abgreeve Adrian Greeve
            Adrian Greeve Adrian Greeve
            Jake Dallimore Jake Dallimore
            Mihail Geshoski Mihail Geshoski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour, 16 minutes
                1d 1h 16m

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