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

Allow plugins to hook into/extend site default homepage options

XMLWordPrintable

    • MOODLE_405_STABLE
    • MOODLE_405_STABLE
    • Hide

      Setup

      1. Install demo plugin:

        $ git clone https://github.com/paulholden/moodle-local_homepagedemo.git local/homepagedemo
        

      2. Log in as admin
      3. Complete installation

      Test site configuration

      1. Log in as admin
      2. Navigate to Appearance > Navigation in site administration
      3. Confirm Start page for users contains the following two options:

        Page 1
        Calendar
        

      4. Set Start page for users to "Calendar" and save
      5. Log out
      6. Log in as admin
      7. Confirm you are redirected to the following URL after login:

        local/homepagedemo/page2.php
        

      Test user preference

      1. Navigate to Appearance > Navigation in site administration
      2. Set Start page for users to User preference and save
      3. Navigate to Preferences from user menu
      4. Press Start page
      5. Confirm Start page contains "Page 1"
      6. Confirm Start page does not contain "Calendar"
      7. Set Start page to "Page 1" and save
      8. Log out
      9. Log in as admin
      10. Confirm you are redirected to the following URL after login:

        local/homepagedemo/page1.php
        

      Show
      Setup Install demo plugin: $ git clone https://github.com/paulholden/moodle-local_homepagedemo.git local/homepagedemo Log in as admin Complete installation Test site configuration Log in as admin Navigate to Appearance > Navigation in site administration Confirm Start page for users contains the following two options: Page 1 Calendar Set Start page for users to "Calendar" and save Log out Log in as admin Confirm you are redirected to the following URL after login: local/homepagedemo/page2.php Test user preference Navigate to Appearance > Navigation in site administration Set Start page for users to User preference and save Navigate to Preferences from user menu Press Start page Confirm Start page contains "Page 1" Confirm Start page does not contain "Calendar" Set Start page to "Page 1" and save Log out Log in as admin Confirm you are redirected to the following URL after login: local/homepagedemo/page1.php
    • 1
    • WP Sprint 2024-I2.2 (Clones), WP Sprint 2024-I2.3 (Clones), WP Sprint 2024-I3.0 (Clones)

      Allow plugins to extend the 'defaulthomepage' configuration of a site, to provide additional options

      We require this for Workplace and will contribute necessary changes to Moodle, specifically so we can allow tenant sites to use custom pages (WP-4849) or learning catalogue (WP-4850) as the homepage

      We require MDL-81942 to land in addition, to ensure this setting applies to guest users too

      Approach

      Per this comment, after consultation with UX we will use "Option 1" (everything displayed in a single select element)

      1. We should consider how that configuration will be stored
      2. We should allow plugins to add multiple elements in their hook implementation (see also 1. above)
      3. We should also make the same select elements available in users preferred start page (where site configuration is set to allow)
      4. We should also allow plugin hook implementations to define whether they can also be selected from users preference page

            pholden Paul Holden
            pholden Paul Holden
            Pedro Jordao Pedro Jordao
            Jun Pataleta Jun Pataleta
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 38 minutes
                3h 38m

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