Moodle
  1. Moodle
  2. MDL-15425

Search Filters are too persistant

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.1
    • Fix Version/s: 1.9.4
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      30811

      Description

      As seen on moodle.org:

      1) Search plugins database for lightbox and view the lightbox module result
      2) Close window and and click a link for a different module:http://moodle.org/mod/data/view.php?d=13&rid=891
      3) Notice how lightbox module is displayed for this link still

      If the filter is reset we click that link again we get the relevant module (brainstorm). But this search behaviour affecting the result of module display is confusing

      1. [MDL-15425]_without_logical_operators.patch
        1 kB
        Robert Allerstorfer
      2. MDL-15425.patch
        5 kB
        Robert Allerstorfer

        Issue Links

          Activity

          Hide
          Eloy Lafuente (stronk7) added a comment -

          Yup, really annoying.

          IMO, any link to the "view one" template should ignore current filters completely and go straight to the requested record (without resetting filters and so, just ignoring).

          Assigning this to Robert (TIA!) and addressing to 1.9.2

          Thanks for the report, Dan!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Yup, really annoying. IMO, any link to the "view one" template should ignore current filters completely and go straight to the requested record (without resetting filters and so, just ignoring). Assigning this to Robert (TIA!) and addressing to 1.9.2 Thanks for the report, Dan! Ciao
          Hide
          Robert Allerstorfer added a comment -

          The attached patch (MDL-15425.patch) should fix this bug. Eloy, could you please review?

          Show
          Robert Allerstorfer added a comment - The attached patch ( MDL-15425 .patch) should fix this bug. Eloy, could you please review?
          Hide
          Robert Allerstorfer added a comment -

          Eloy, do you think it's safe to commit this patch before the 1.9.2 release? It works for me.

          Show
          Robert Allerstorfer added a comment - Eloy, do you think it's safe to commit this patch before the 1.9.2 release? It works for me.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Hi Robert ,

          jut saw you committed fix for this some hours ago. It looks perfect for me B-) but I would change this use of logical operators:

          $filter || $search = '';
          $search && $moreurl .= '&filter=1';

          by more "standard" conditions. Not because they don't do their work but because of current coding style and readability.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Hi Robert , jut saw you committed fix for this some hours ago. It looks perfect for me B-) but I would change this use of logical operators: $filter || $search = ''; $search && $moreurl .= '&filter=1'; by more "standard" conditions. Not because they don't do their work but because of current coding style and readability. Ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          I'm reopening this until final decision.

          Show
          Eloy Lafuente (stronk7) added a comment - I'm reopening this until final decision.
          Hide
          Robert Allerstorfer added a comment -

          OK Eloy,

          the new patch replaces the "logical operator style" by the "easy to understand trivial style".

          Show
          Robert Allerstorfer added a comment - OK Eloy, the new patch replaces the "logical operator style" by the "easy to understand trivial style".
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Thanks a lot Robert. Trivial style change applied. Resolving as fixed.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Thanks a lot Robert. Trivial style change applied. Resolving as fixed. Ciao
          Hide
          Anthony Borrow added a comment -

          I'm just wondering if the change to MDL-15425 may be related to MDL-18136

          Show
          Anthony Borrow added a comment - I'm just wondering if the change to MDL-15425 may be related to MDL-18136
          Hide
          Jérôme Mouneyrac added a comment -

          it works well on Moodle.org, thanks everybody

          Show
          Jérôme Mouneyrac added a comment - it works well on Moodle.org, thanks everybody

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: