Moodle

Administration block search doesn't list all the possibilities

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8, 1.9
  • Fix Version/s: 1.9, 2.0
  • Component/s: Administration
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE

Description

If you search for a sub-menu, say "filters", you don't get the filters page, you get the filters settings page. It's probably more likely that you wanted the filters page, but you would never know it existed using search. Similarly if you are looking for the "blocks" administration page you will find the Theme Settings page, again probably not what you were looking for.

  1. patch-8628.diff
    29/Nov/07 6:36 AM
    3 kB
    David Mudrak
  2. patch-8628-2.diff
    29/Nov/07 8:21 AM
    4 kB
    David Mudrak

Issue Links

Activity

Hide
Martin Dougiamas added a comment -

Yes, I'd like to see all the sub-admin stuff come up in the searches too.

We need to add some mechanism for such things to "register" themselves in the search ...

Show
Martin Dougiamas added a comment - Yes, I'd like to see all the sub-admin stuff come up in the searches too. We need to add some mechanism for such things to "register" themselves in the search ...
Hide
David Mudrak added a comment -

I have got working patch - see attached.

The patch simply adds support for seaching for a query string in $name or $visiblename of all three kinds of admin tree nodes: admin_category, admin_externalpage and admin_settingpage

Show
David Mudrak added a comment - I have got working patch - see attached. The patch simply adds support for seaching for a query string in $name or $visiblename of all three kinds of admin tree nodes: admin_category, admin_externalpage and admin_settingpage
Hide
David Mudrak added a comment -

Please note - the patch provided above may lead to duplicate search results (e.g. try look for "userpolicies"). This is something to work on yet. Maybe as MD proposed, some sort of register mechanism would take care of these duplicates, sorting the results etc.

Another solution might be to rewrite search_settings_html() to work with an array of found items, while these items may be either a category, external page, setting page or an array of setting found on a page.

Show
David Mudrak added a comment - Please note - the patch provided above may lead to duplicate search results (e.g. try look for "userpolicies"). This is something to work on yet. Maybe as MD proposed, some sort of register mechanism would take care of these duplicates, sorting the results etc. Another solution might be to rewrite search_settings_html() to work with an array of found items, while these items may be either a category, external page, setting page or an array of setting found on a page.
Hide
David Mudrak added a comment -

OK - please, forget and remove previous patch-8628.diff - it did not work at all (shame on me)

Attached you can find patch-8628-2.diff that solves previously mentioned problem with duplicates and produces valid information (links) about found pages.

  • for matching category, it displays breadcrumb trail to it
  • for matching external page, it produces a link to it
  • for matching setting page, it produces a link to it and optionally the form with matching setting items
Show
David Mudrak added a comment - OK - please, forget and remove previous patch-8628.diff - it did not work at all (shame on me) Attached you can find patch-8628-2.diff that solves previously mentioned problem with duplicates and produces valid information (links) about found pages.
  • for matching category, it displays breadcrumb trail to it
  • for matching external page, it produces a link to it
  • for matching setting page, it produces a link to it and optionally the form with matching setting items
Hide
Petr Škoda (skodak) added a comment -

I have rewritten the search code, it should work fine now,
this report and code did help, thanks!

Show
Petr Škoda (skodak) added a comment - I have rewritten the search code, it should work fine now, this report and code did help, thanks!
Hide
Nicolas Martignoni added a comment -

After some tests on 1.9beta3, seems to work very well. Closing.

Show
Nicolas Martignoni added a comment - After some tests on 1.9beta3, seems to work very well. Closing.

Dates

  • Created:
    Updated:
    Resolved: