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

Navigation - defaulthomepage for user preference not functional for admin user

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.5, 2.1.2, 2.2
    • Fix Version/s: 2.0.6, 2.1.3
    • Component/s: Navigation
    • Labels:
    • Testing Instructions:
      Hide

      1. Log in as an admin
      2. Set defaulthomepage to `User preference` (Settings > Site administration > Appearance > Navigation)
      3. In the navigation browse to `My home`
      4. In settings expand My profile settings and check that there is a `Make this my default home page` link
      5. Click that link
      6. Browse to any course
      7. Check that `My home` is now the first item in the navbar and that it links to /my/

      Show
      1. Log in as an admin 2. Set defaulthomepage to `User preference` (Settings > Site administration > Appearance > Navigation) 3. In the navigation browse to `My home` 4. In settings expand My profile settings and check that there is a `Make this my default home page` link 5. Click that link 6. Browse to any course 7. Check that `My home` is now the first item in the navbar and that it links to /my/
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull Master Branch:
      wip-MDL-27278-master

      Description

      I'm not quite sure which component to choose but navigation seems like a good place to start. This issue is created in response to Ray Lawrence's question in the forums (http://moodle.org/mod/forum/discuss.php?d=172992) about how to set the user preference for the user home page. It does not seem possible for the site admin to be able to do this because of the current logic.

      To re-create the issue:

      1) Login as site admin and set defaulthomepage to 'User preference' (via Settings -> Appearance -> Navigation)
      2) The intended functionality is that a link is added if the current page is not the user's preferred home page to allow it to be switched via the optional setdefaulthome param; however, the logic is by-passed because of the use of an else if in the case of the user with the site config option. As a result, under Settings -> My profile settings the admin does not see the expected 'Make this my default home page' link.

      As a result of this bug, the admin does not have the ability to select their default home page user preference as other users can and it thus makes it seem like hidden functionality. I would propose simply removing the else if and making it its own separate if statement. I do not see any concerns as it just allows site admins the ability to have that code executed.

      Peace - Anthony

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                28/Nov/11