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

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1.2
    • Component/s: Global search
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

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

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Sep/16