Moodle
  1. Moodle
  2. MDL-33990

Remove two uncessary yui2 requirements

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3.1
    • Component/s: AJAX and JavaScript
    • Labels:
      None
    • Testing Instructions:
      Hide
      1. Checking the code for M.util.set_user_preference you can see yui-connection is not used.

      Test that the set_user_preference is working fine:

      1. Go to a page with blocks
      2. Click the - hide button to keep that block hidden
      3. Reload the page
      4. VERIFY: that this block is hidden
      5. Go to my private files and bring up file picker
      6. Select a upload a file repository
      7. Chose a file
      8. Set license as 'creative commons - sharealike'
      9. Upload the file
      10. Save changes
      11. Bring up file picker again
      12. VERIFY: That the 'upload a file' repository is selected automatically
      13. VERIFY: That the 'creative commons - sharealike' license is selected automatically
      Show
      Checking the code for M.util.set_user_preference you can see yui-connection is not used. Test that the set_user_preference is working fine: Go to a page with blocks Click the - hide button to keep that block hidden Reload the page VERIFY: that this block is hidden Go to my private files and bring up file picker Select a upload a file repository Chose a file Set license as 'creative commons - sharealike' Upload the file Save changes Bring up file picker again VERIFY: That the 'upload a file' repository is selected automatically VERIFY: That the 'creative commons - sharealike' license is selected automatically
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
    • Rank:
      42102

      Description

      Whilst looking at javascript included I noticed that even on plain moodle page there were some yui2 requirements which are not necessary.

      1. yui2 logger - we dont need this on every load YAHOO.log
      2. yui2-connection on user_preference_allow_ajax_update. user preference update now uses yui3 so this is not required

      By removing these uncessary requirements we shave 10ms off javascript loading (on my fast machine, even little helps)

        Issue Links

          Activity

          Hide
          Sam Hemelryk added a comment -

          Aha good spotting Dan! has been integrated now and cherry-picked to 23.

          Show
          Sam Hemelryk added a comment - Aha good spotting Dan! has been integrated now and cherry-picked to 23.
          Hide
          Andrew Davis added a comment -

          No references to "yui-connection" found anywhere in core. All works as described. Passing.

          Show
          Andrew Davis added a comment - No references to "yui-connection" found anywhere in core. All works as described. Passing.
          Hide
          Sam Hemelryk added a comment -

          Congratulations your code is upstream - gold star for you!

          This issue + 79 others made it in in time for the minor releases.
          Thank you everyone involved for your exuberant efforts.

          Show
          Sam Hemelryk added a comment - Congratulations your code is upstream - gold star for you! This issue + 79 others made it in in time for the minor releases. Thank you everyone involved for your exuberant efforts.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: