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

paging_bar previous/next buttons have wrong page numbers

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Requirements

      1. A course with at least 100 enrolments. Can use:

        php admin/tool/generator/cli/maketestcourse.php --shortname=MDL-68427 --size=S
        

      Testing

      1. Apply the attached patch (0001-DO-NOT-COMMIT.patch):

        git am /path/to/0001-DO-NO-COMMIT.patch
        

      2. View the course page
      3. Choose "Participants" from the drawer on the left
      4. Edit the URL by changing the perpage=20 to perpage=5 or add &perpage=5 if the parameter is missing and ensure you press enter to load the page
        1. Confirm that the pagination links show the current page as page 1
        2. *Confirm that there is no "Previous page" button (with a label like <<)
        3. Confirm that the "Next page" button is labelled ">> (2)"
        4. Confirm that there is a "Last page" which just as the final page number after a ...
      5. Click on the Next page button
        1. Confirm that the pagination links show the current page as page 2
        2. Confirm that the "Previous page" button is labelled "<< (1)"
        3. Confirm that the "Next page" button is labelled ">> (3)"
        4. Confirm that there is a "Last page" which just as the final page number after a ...
      6. Click on the "Last page" button
        1. Confirm that the pagination links show the current page as the number that you clicked
        2. Confirm that the "Previous page" button is labelled "<< ([previous page number])"
        3. Confirm that there is no "Next page" button
        4. Confirm that there is a "First page" which just as "1" and that there is a ... marked before another page number
      Show
      Requirements A course with at least 100 enrolments. Can use: php admin/tool/generator/cli/maketestcourse.php --shortname=MDL-68427 --size=S Testing Apply the attached patch ( 0001-DO-NOT-COMMIT.patch ): git am /path/to/0001-DO-NO-COMMIT.patch View the course page Choose "Participants" from the drawer on the left Edit the URL by changing the perpage=20 to perpage=5  or add &perpage=5 if the parameter is missing and ensure you press enter to load the page Confirm that the pagination links show the current page as page 1 *Confirm that there is no "Previous page" button (with a label like << ) Confirm that the "Next page" button is labelled ">> (2)" Confirm that there is a "Last page" which just as the final page number after a ... Click on the Next page button Confirm that the pagination links show the current page as page 2 Confirm that the "Previous page" button is labelled "<< (1)" Confirm that the "Next page" button is labelled ">> (3)" Confirm that there is a "Last page" which just as the final page number after a ... Click on the "Last page" button Confirm that the pagination links show the current page as the number that you clicked Confirm that the "Previous page" button is labelled "<< ( [previous page number] )" Confirm that there is no "Next page" button Confirm that there is a "First page" which just as "1" and that there is a ... marked before another page number
    • Affected Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Pull 3.7 Branch:
    • Pull 3.8 Branch:
    • Pull Master Branch:
      MDL-68427-master
    • Story Points:
      1
    • Sprint:
      International 3.9 - Sprint 10

      Description

      We are doing some incorrect math to work out the previous and next page numbers in paging_bar

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              dobedobedoh Andrew Nicols
              Peer reviewer:
              Simey Lameze
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Amaia Anabitarte
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/May/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 6 hours, 27 minutes
                  6h 27m