Moodle

Database pagination broken when searching for entries

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.4
  • Fix Version/s: 1.9.5, 2.0
  • Labels:
    None

Description

In the Modules & Plugins database, search for a string, for example 'light' and observe that the search returns 2 pages of results.

Click on 'Next' to take you to the second page of results, and you are now viewing all the results from the database because the 'Search' field has been reset (other filter settings seem to carry between pages though).

Issue Links

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Attaching patch that should fix the paging links when a search is in progress.

Show
Eloy Lafuente (stronk7) added a comment - Attaching patch that should fix the paging links when a search is in progress.
Hide
Eloy Lafuente (stronk7) added a comment -

Assigning to Dongsheng and addressing to 1.9.5.

Can you check that all the paging both without filters, with simple and with advanced filters is working ok?

TIA & ciao

Show
Eloy Lafuente (stronk7) added a comment - Assigning to Dongsheng and addressing to 1.9.5. Can you check that all the paging both without filters, with simple and with advanced filters is working ok? TIA & ciao
Hide
Anthony Borrow added a comment -

Thanks Eloy and Dongsheng for working to get this resolved. Perhaps we could test with Moodle.org Actually it would be good to apply the patch to Moodle.org once it is confirmed that it works. Peace - Anthony

Show
Anthony Borrow added a comment - Thanks Eloy and Dongsheng for working to get this resolved. Perhaps we could test with Moodle.org Actually it would be good to apply the patch to Moodle.org once it is confirmed that it works. Peace - Anthony
Hide
Dongsheng Cai added a comment -

Veified, it worked both with/without filter.

Show
Dongsheng Cai added a comment - Veified, it worked both with/without filter.
Hide
Martin Dougiamas added a comment -

Moodle.org updated now.

Show
Martin Dougiamas added a comment - Moodle.org updated now.
Hide
Jerome Mouneyrac added a comment -

it works perfect, thanks

Show
Jerome Mouneyrac added a comment - it works perfect, thanks
Hide
Petr Škoda (skodak) added a comment -

$search && $baseurl .= 'filter=1&';

Is not our recommended coding style, right?

Could we change it to normal if($search) {....} ?

Show
Petr Škoda (skodak) added a comment - $search && $baseurl .= 'filter=1&'; Is not our recommended coding style, right? Could we change it to normal if($search) {....} ?
Hide
Dongsheng Cai added a comment -

Fixed, thank you for reviewing

Show
Dongsheng Cai added a comment - Fixed, thank you for reviewing
Hide
Jerome Mouneyrac added a comment -

Still works, thanks Petr and Dongsheng.

Show
Jerome Mouneyrac added a comment - Still works, thanks Petr and Dongsheng.

Dates

  • Created:
    Updated:
    Resolved: