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

Remove two uncessary yui2 requirements

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.3.1
    • 2.3
    • JavaScript
    • None
    • MOODLE_23_STABLE
    • MOODLE_23_STABLE
    • 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

      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)

            poltawski Dan Poltawski
            poltawski Dan Poltawski
            Sam Hemelryk Sam Hemelryk
            Andrew Davis Andrew Davis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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