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

        1. 1_MDL-74596_master.png
          17 kB
          John Edward Pedregosa
        2. 2_MDL-74596_master.png
          31 kB
          John Edward Pedregosa
        3. 3_MDL-74596_master.png
          15 kB
          John Edward Pedregosa
        4. confusing_search.png
          103 kB
          Marina Glancy
        5. no_search_bar_on_default_dashboard_page.png
          87 kB
          Marina Glancy
        6. Screenshot 2022-06-03 at 09.45.04.png
          991 kB
          Rafael Lechugo
        7. Screenshot 2022-06-03 at 09.48.37.png
          1.10 MB
          Rafael Lechugo
        8. search_bar_on_default_dashboard.png
          90 kB
          Marina Glancy

        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
              Votes:
              2 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                28/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