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

Skip redirect to Dashboard from logo link when $CFG->defaulthomepage is set

    XMLWordPrintable

    Details

    • Pull from Repository:
    • Pull Master Branch:
      mdl-72838-fix-master
    • Testing Instructions:
      Hide

      Unit tests + existing behat tests + manual tests:

      1.  Be logged out.
        1.  On any page
        2. Confirm Logo should always link to site root ('/').
      2. Log in as admin
        1. Go to Site Aministration > Appearance > Navigation
        2. Set 'Home page for users' to 'Site'.
        3. Confirm Logo should link to site root ('/')
        4. Set 'Home page for users' to 'Dashboard'.
        5. Confirm Logo should link to user dashboard root ('/my/')
        6. Set 'Home page for users' to User preference.
        7. Go to user menu > Preferences > Home page
        8. Set 'Home page' to 'Site'
        9. Confirm Logo should link to site root ('/')
        10. Set 'Home page' to 'Dashboard'
        11. Confirm Logo should link to user dashboard root ('/my/')
      Show
      Unit tests + existing behat tests + manual tests:  Be logged out.  On any page Confirm Logo should always link to site root ('/'). Log in as admin Go to Site Aministration > Appearance > Navigation Set 'Home page for users' to 'Site'. Confirm Logo should link to site root ('/') Set 'Home page for users' to 'Dashboard'. Confirm  Logo should link to user dashboard root ('/my/') Set 'Home page for users' to User preference. Go to user menu > Preferences > Home page Set 'Home page' to 'Site' Confirm  Logo should link to site root ('/') Set 'Home page' to 'Dashboard' Confirm  Logo should link to user dashboard root ('/my/')

      Description

      In most sites $CFG->defaulthomepage is set to Dashboard and roughly 1% of traffic is people on random pages clicking on the logo of the site, which takes you to / which then redirects you to the dashboard here:

      https://github.com/moodle/moodle/blob/master/index.php#L72-L73

      So roughly 1% of traffic could be dropped, as well as at least a 100ms (or ~500ms on mobile) perceived page load speed up can be gained for these users by making the logo link to the correct place to start with and avoid the redirect.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            brendanheywood Brendan Heywood
            Peer reviewer:
            Brendan Heywood Brendan Heywood
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Matteo Scaramuccia, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated: