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

Add a new option to hide search bar in admin pages

    XMLWordPrintable

Details

    • MOODLE_400_STABLE
    • MOODLE_401_STABLE
    • MDL-74596-400
    • MDL-74596-master
    • Hide
      1. Login as admin
      2. Go to Site administration>Users>Browse users
      3. Make sure you can see a site administration search bar in the top right corner
      4. Go to Site administration>Appearance>Default dashboard page
      5. Make sure you can NOT see a site administration search bar
      6. Modify the source code of admin/user.php and make the following change:

        --- a/admin/user.php
        +++ b/admin/user.php
        @@ -21,7 +21,7 @@
             $unlock       = optional_param('unlock', 0, PARAM_INT);
             $resendemail  = optional_param('resendemail', 0, PARAM_INT);
         
        -    admin_externalpage_setup('editusers');
        +    admin_externalpage_setup('editusers', '', null, '', ['nosearch' => true]);
         
             $sitecontext = context_system::instance();
             $site = get_site();
        

      7. Return to the "Site administration>Users>Browse users" page, make sure the search bar is no longer displayed
      Show
      Login as admin Go to Site administration>Users>Browse users Make sure you can see a site administration search bar in the top right corner Go to Site administration>Appearance>Default dashboard page Make sure you can NOT see a site administration search bar Modify the source code of admin/user.php and make the following change: --- a/admin/user.php +++ b/admin/user.php @@ -21,7 +21,7 @@ $unlock = optional_param('unlock', 0, PARAM_INT); $resendemail = optional_param('resendemail', 0, PARAM_INT); - admin_externalpage_setup('editusers'); + admin_externalpage_setup('editusers', '', null, '', ['nosearch' => true]); $sitecontext = context_system::instance(); $site = get_site(); Return to the "Site administration>Users>Browse users" page, make sure the search bar is no longer displayed

    Description

      Will be nice to have a new option ('hidesearchbar' or something similar) passed to admin_externalpage_setup function to avoid adding the searchbar as header action in some cases.

      Attachments

        Issue Links

          Activity

            People

              marina Marina Glancy
              mikelmartíncorrales Mikel Martín Corrales
              Mikel Martín Corrales Mikel Martín Corrales
              Jun Pataleta Jun Pataleta
              John Edward Pedregosa John Edward Pedregosa
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Huong Nguyen, Barbara Ramiro, Bas Brands, Mathew May
              Votes:
              2 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Nov/22

                Time Tracking

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