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

Add pagination to the manage tools page to help with large volumes of tools

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Setup

      To test pagination, and the issue it solves, a large number of tool types need to be created. They can be mock types. I accomplished this locally, adding 3000 tools (As per current client) by:
      1. Run SQL in DB (assumes you use mdl_ table prefix):

      INSERT INTO mdl_lti_types (name, baseurl, tooldomain, state, course, coursevisible, ltiversion, createdby, timemodified, timecreated) SELECT CONCAT('ltitool', i), CONCAT('https://ltitool', i, '.org'), CONCAT('ltitool', i,'.org'), 1, 1, 1, 'LTI-1p0', 2, 1601448605, 1601448605 FROM generate_series(1, 3000) i;

      Test pagination

      Before patch

      1. Go to Site Administration -> Plugins -> Activity modules -> Manage tools (/mod/lti/toolconfigure.php)
      2. Record time for page to load all tool type cards.
      3. The page may be more or less functional while scrolling depending on your machine's hardware, and browser support for hardware acceleration.

      After patch

      1. Go to Site Administration -> Plugins -> Activity modules -> Manage tools (/mod/lti/toolconfigure.php)
      2. Record time for page to load first page of tool type cards.
      3. Confirm that only 60 tool cards are shown.
      4. Confirm that a paging bar is shown above the data.
      5. Click '2' in paging bar.
      6. Confirm that the next set of 60 tool cards are shown.
      7. Click 'Last' in paging bar.
      8. Confirm that the final set of tools are shown. E.g. You can see 'Tool 3000' at end of page.
      Show
      Setup To test pagination, and the issue it solves, a large number of tool types need to be created. They can be mock types. I accomplished this locally, adding 3000 tools (As per current client) by: 1. Run SQL in DB (assumes you use mdl_ table prefix): INSERT INTO mdl_lti_types (name, baseurl, tooldomain, state, course, coursevisible, ltiversion, createdby, timemodified, timecreated) SELECT CONCAT( 'ltitool' , i), CONCAT( 'https://ltitool' , i, '.org' ), CONCAT( 'ltitool' , i, '.org' ), 1 , 1 , 1 , 'LTI-1p0' , 2 , 1601448605 , 1601448605 FROM generate_series( 1 , 3000 ) i; Test pagination Before patch Go to Site Administration -> Plugins -> Activity modules -> Manage tools (/mod/lti/toolconfigure.php) Record time for page to load all tool type cards. The page may be more or less functional while scrolling depending on your machine's hardware, and browser support for hardware acceleration. After patch Go to Site Administration -> Plugins -> Activity modules -> Manage tools (/mod/lti/toolconfigure.php) Record time for page to load first page of tool type cards. Confirm that only 60 tool cards are shown. Confirm that a paging bar is shown above the data. Click '2' in paging bar. Confirm that the next set of 60 tool cards are shown. Click 'Last' in paging bar. Confirm that the final set of tools are shown. E.g. You can see 'Tool 3000' at end of page.
    • Affected Branches:
      MOODLE_37_STABLE, MOODLE_39_STABLE
    • Pull Master Branch:
      MDL-69092-master_lti_pagination

      Description

      The LTI toolconfig page site/mod/lti/toolconfigure.php takes a long time to load and respond if a huge number (1000) of LTI tools are configured.

      Steps to replicate:

      1. Configure around 1000 LTI tools.
      2. Go to toolconfig page (site/mod/lti/toolconfigure.php)
      3. The page will be unresponsive

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              andrewmadden Andrew Madden
              Reporter:
              gmrsagar Sagar Ghimire
              Peer reviewer:
              Mikhail Golenkov
              Integrator:
              Jake Dallimore
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 1 minute
                  1h 1m