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

course filtering in global search

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1
    • Component/s: Global search
    • Labels:
    • Testing Instructions:
      Hide
      1. Make sure you have solr setup and working, with Page resources on
      2. Create 4 courses, course1-course4
      3. Hide course 3
      4. In each course, create a page resource, with the title "Page X", where X is the number the course is. In the content, put "FindMe".
      5. Index site content
      6. Create a student and enrol them in courses 1-3 (not 4)
      7. Login as the student
      8. Search for FindMe
      9. Confirm that in the filter section, the courses filter says "All courses" with no items selected.
      10. Confirm you see results for Page 1 and Page 2, not Page 3 or 4
      11. In the filter section, click the courses dropdown and confirm you only see course 1 and course 2.
      12. In the filter section, click the courses dropdown and Select course 1.
      13. Search
      14. Confirm you see results for Page 1 only
      15. In the filter section, click the dropdown and Select course 2 (so now 1 and 2 are selected).
      16. Confirm you see results for Page 1 and Page 2, not Page 3 or 4
      17. In the filter section, remove course 1
      18. Seach
      19. Confirm you only see Page 2
      20. Go to the url search/index.php?q=FindMe&courseids=X3 (replace X3 with the id of course 3)
      21. Confirm you see no results
      22. Go to the url search/index.php?q=FindMe&courseids=X2 (replace X2 with the id of course 2)
      23. Confirm you only see Page 2
      24. Go to the url search/index.php?q=FindMe&courseids=X2,X1 (replace X2 with the id of course 2 and X1 with the id of course 1)
      25. Confirm you see Page 1 and Page 2

      The tests above confirm both the search behavior, and the behavior of the new course search box - by confirming non admins can only see enrolled courses (not course 4), and the student can't see a hidden enrolled course (course 3).

      Show
      Make sure you have solr setup and working, with Page resources on Create 4 courses, course1-course4 Hide course 3 In each course, create a page resource, with the title "Page X", where X is the number the course is. In the content, put "FindMe". Index site content Create a student and enrol them in courses 1-3 (not 4) Login as the student Search for FindMe Confirm that in the filter section, the courses filter says "All courses" with no items selected. Confirm you see results for Page 1 and Page 2, not Page 3 or 4 In the filter section, click the courses dropdown and confirm you only see course 1 and course 2. In the filter section, click the courses dropdown and Select course 1. Search Confirm you see results for Page 1 only In the filter section, click the dropdown and Select course 2 (so now 1 and 2 are selected). Confirm you see results for Page 1 and Page 2, not Page 3 or 4 In the filter section, remove course 1 Seach Confirm you only see Page 2 Go to the url search/index.php?q=FindMe&courseids=X3 (replace X3 with the id of course 3) Confirm you see no results Go to the url search/index.php?q=FindMe&courseids=X2 (replace X2 with the id of course 2) Confirm you only see Page 2 Go to the url search/index.php?q=FindMe&courseids=X2,X1 (replace X2 with the id of course 2 and X1 with the id of course 1) Confirm you see Page 1 and Page 2 The tests above confirm both the search behavior, and the behavior of the new course search box - by confirming non admins can only see enrolled courses (not course 4), and the student can't see a hidden enrolled course (course 3).
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Epic Link:
    • Pull Master Branch:
      MDL-53167-master

      Description

      An important missing feature in global search is course filtering. All indexed documents have a courseid field, the field can be used to set the filter sent to the search engine.

      For what I've heard autocomplete form field, is a drop down if there are less than X courses, otherwise you have to start typing, but this courses filter seems a good candidate to use it.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  23/May/16