A full list of Pages don't show up

Bug #1053708 reported by Son Nguyen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Son Nguyen
1.6
Fix Released
Medium
Unassigned
1.7
Fix Released
Medium
Unassigned
1.8
Fix Released
Medium
Unassigned

Bug Description

Version: master
Platform: all
Browser: all

Assumption: You have 11 pages (views) and the number of items per page is 10.

When you jumped to the second page, you could see the 11th page. Now you changed the number of items per page to 20, you only see the 11th view. You should see all 11 views.

Revision history for this message
Hugh Davenport (hugh-davenport) wrote :

I think this is related to 1017280, Son, would you call it a duplicate?

Changed in mahara:
status: New → Incomplete
importance: Undecided → Medium
milestone: none → 1.7.0
Revision history for this message
Hugh Davenport (hugh-davenport) wrote :

Sorry, I'm mistaken, just sounded familiar

Changed in mahara:
status: Incomplete → Triaged
tags: added: academy
Matthew B (mattjbjb)
Changed in mahara:
assignee: nobody → Matthew B (mattjbjb)
status: Triaged → In Progress
Revision history for this message
Matthew B (mattjbjb) wrote :
tags: added: pagination
Matthew B (mattjbjb)
Changed in mahara:
assignee: Matthew B (mattjbjb) → nobody
status: In Progress → Confirmed
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.7.0 → 1.8.0
Revision history for this message
Jose Fontanilla (jgsfontanilla) wrote :

I would just like to contribute my solution to this bug, is this an acceptable answer?

In /js/paginator.js we have the function rewritePaginatorSelectFormWithoutJSON which has the line:

     url += "&" + currentoffset.name + "=" + currentoffset.value;

I modified it to:

     url += "&" + currentoffset.name + "=" + 0;

My argument is that whenever the drop down list for the page size is changed (say from 20 to 10 or vice versa), the offset should be reset to 0 since the value (or multiples) of the offset is dependent on the current size of the limit.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Hi Jose,

Well, it would be nicer to be able to retain the user's progress through the pages when they change the number of results per page. See, for example, what happens if you page forward 20 results on a Wikipedia history page (like this one http://en.wikipedia.org/w/index.php?title=Europe&dir=prev&offset=20130325233340&limit=20&action=history ), and then change the number of results per page to 50.

However, your suggestion does at least fix the current bug of being stuck on "result 11" with no way to go back to result 1, so I'm willing to upstream it. :)

If you can submit your patch to our gerrit code review system (as described here: https://wiki.mahara.org/index.php/Developer_Area/Contributing_Code ) that'd be great. If you can't get that working, though, I'd be happy to submit the patch for you; just let me know what name & (optional) email address you want on the commit's "author" line. :)

Cheers,
Aaron

Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8rc1 → 1.8.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8.0 → 1.8.1
Revision history for this message
Son Nguyen (ngson2000) wrote :
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/2743
Committed: http://gitorious.org/mahara/mahara/commit/43eae401a5b0d4bad99852a7a7786dd662821922
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 43eae401a5b0d4bad99852a7a7786dd662821922
Author: Son Nguyen <email address hidden>
Date: Tue Nov 26 11:18:30 2013 +1300

Reset the offset value when changing the page size (Bug 1053708)

in the paginator

Change-Id: I362704b27761c334be712a32f3b3e5f73c3b3b37
Signed-off-by: Son Nguyen <email address hidden>

Revision history for this message
Aaron Wells (u-aaronw) wrote :
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/2745
Committed: http://gitorious.org/mahara/mahara/commit/a72fc7e17238574765c27df13bd071c0f24211f0
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.6_STABLE

commit a72fc7e17238574765c27df13bd071c0f24211f0
Author: Son Nguyen <email address hidden>
Date: Tue Nov 26 11:18:30 2013 +1300

Reset the offset value when changing the page size (Bug 1053708)

in the paginator

Change-Id: I362704b27761c334be712a32f3b3e5f73c3b3b37
Signed-off-by: Son Nguyen <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/2746
Committed: http://gitorious.org/mahara/mahara/commit/8a3d755678cddd65ff94a4d59a1f14bca4c35c8e
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.7_STABLE

commit 8a3d755678cddd65ff94a4d59a1f14bca4c35c8e
Author: Son Nguyen <email address hidden>
Date: Tue Nov 26 11:18:30 2013 +1300

Reset the offset value when changing the page size (Bug 1053708)

in the paginator

Change-Id: I362704b27761c334be712a32f3b3e5f73c3b3b37
Signed-off-by: Son Nguyen <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/2747
Committed: http://gitorious.org/mahara/mahara/commit/c1c7bde2ae9bb2f4ac40015aa91744bbe0fdab00
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.8_STABLE

commit c1c7bde2ae9bb2f4ac40015aa91744bbe0fdab00
Author: Son Nguyen <email address hidden>
Date: Tue Nov 26 11:18:30 2013 +1300

Reset the offset value when changing the page size (Bug 1053708)

in the paginator

Change-Id: I362704b27761c334be712a32f3b3e5f73c3b3b37
Signed-off-by: Son Nguyen <email address hidden>

Aaron Wells (u-aaronw)
Changed in mahara:
status: Fix Committed → Fix Released
Jono M (jonom)
tags: removed: academy
Aaron Wells (u-aaronw)
no longer affects: mahara/1.9
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.