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

Search: Label URLs not correctly calculated

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      0 Configure your test system for global search with Apache Solr; ensure all search areas, or at least the Label ones, are enabled, and search is working.

      1 Create a new course using Weekly format. Set the 'Course layout' option to show each section on its own page, instead of all of them on its own.

      2 Click into the 3rd week of the course and add a label with text: 'Label includes the word gromblesqueeze.'

      (Notice that as a user, from the course home page, you now access the label by clicking the 3rd week from the list, which then opens a page containing only that section, and then you see the label.)

      3 Turn editing off.

      4 Update the search index (e.g. by clicking 'run now' against the search index task in Scheduled Tasks)

      5 Using the ? icon in the search bar, search for 'gromblesqueeze'.

      6. Click on the main link for the result you just got.

      EXPECTED: The link should take you to the section page for that section (the label may jump into view, as it's still in the anchor for the page).

      BEFORE THIS FIX: The link just takes you to the course page where the label is not visible.

      7. Edit the course settings, change 'Course layout' to show all sections on one page

       8. Repeat the search and click the main link

      EXPECTED: You should get to the single course page, showing the label (this is the same as it used to work).
      9. Repeat the above tests for the topics format.

      Show
      0 Configure your test system for global search with Apache Solr; ensure all search areas, or at least the Label ones, are enabled, and search is working. 1 Create a new course using Weekly format. Set the 'Course layout' option to show each section on its own page, instead of all of them on its own. 2 Click into the 3rd week of the course and add a label with text: 'Label includes the word gromblesqueeze.' (Notice that as a user, from the course home page, you now access the label by clicking the 3rd week from the list, which then opens a page containing only that section, and then you see the label.) 3 Turn editing off. 4 Update the search index (e.g. by clicking 'run now' against the search index task in Scheduled Tasks) 5 Using the ? icon in the search bar, search for 'gromblesqueeze'. 6. Click on the main link for the result you just got. EXPECTED: The link should take you to the section page for that section (the label may jump into view, as it's still in the anchor for the page). BEFORE THIS FIX: The link just takes you to the course page where the label is not visible. 7. Edit the course settings, change 'Course layout' to show all sections on one page  8. Repeat the search and click the main link EXPECTED: You should get to the single course page, showing the label (this is the same as it used to work). 9. Repeat the above tests for the topics format.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull Master Branch:
      MDL-58947-master

      Description

      When showing search results, the link for Label does not always work correctly, depending on the course format. For example, it does not work in core formats if the option to view each section on its own page is turned on.

      It should use the course format's provided method to get the URL for the section that contains the label.

        Attachments

          Activity

            People

            • Assignee:
              quen Sam Marshall
              Reporter:
              quen Sam Marshall
              Peer reviewer:
              David Monllaó
              Integrator:
              Jake Dallimore
              Tester:
              Damyon Wiese
              Participants:
              Component watchers:
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Jul/17