Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-55538 GSOC 2016 global search additions
  3. MDL-55390

Global search manager is not checking that classes under classes/search are actually search areas (extends core_search\base)

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1
    • 3.1.2
    • Global search
    • MOODLE_31_STABLE
    • MOODLE_31_STABLE
    • Hide
      1. Create an abstract class extending \core_search\base (in 3.1: \core_search\area\base). eg. base_forum in mod_forum\search.
      2. Create a concrete class extending base_forum or core_search\base . eg., forum_sub in mod_forum\search.
      3. Create another class that extends forum_sub. eg., forum_sub_sub in mod_forum\search.
      4. Assign language strings for both classes in mod/forum/lang/en/forum.php :

        $string['search:base_forum'] = 'Forum-base';
        $string['search:forum_sub'] = 'Forum-sub';
        $string['search:forum_sub_sub'] = 'Forum-sub-sub';
        

      5. Login as admin.
      6. Navigate to Site administration ► Plugins ► Search ► Search areas. (In 3.1: Go to Site administration ► Plugins ► Search ► Manage global search then click Enable search areas)
        • Confirm that only Forum-sub and Forum-sub-sub are listed as search areas and they should be available to be enabled, while Forum-base is not displayed as a search area.
      Show
      Create an abstract class extending \core_search\base (in 3.1: \core_search\area\base ). eg. base_forum in mod_forum\search . Create a concrete class extending base_forum or core_search\base . eg., forum_sub in mod_forum\search . Create another class that extends forum_sub . eg., forum_sub_sub in mod_forum\search . Assign language strings for both classes in mod/forum/lang/en/forum.php : $string['search:base_forum'] = 'Forum-base'; $string['search:forum_sub'] = 'Forum-sub'; $string['search:forum_sub_sub'] = 'Forum-sub-sub'; Login as admin. Navigate to Site administration ► Plugins ► Search ► Search areas . (In 3.1: Go to Site administration ► Plugins ► Search ► Manage global search then click Enable search areas ) Confirm that only Forum-sub and Forum-sub-sub are listed as search areas and they should be available to be enabled, while Forum-base is not displayed as a search area.

    Description

      Moodle components may require additional classes under COMPONENT/classes/search/XXX.php like in MDL-54973

      Attachments

        1. without-patch.mpr
          75 kB
          David Monllaó
        2. with-patch.mpr
          78 kB
          David Monllaó

        Issue Links

          Activity

            People

              devang2511 Devang Gaur
              dmonllao David Monllaó
              David Monllaó David Monllaó
              Andrew Lyons Andrew Lyons
              Jun Pataleta Jun Pataleta
              David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                12/Sep/16