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

    • MOODLE_37_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-69092-master_lti_pagination
    • 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 the load time is less than before the patch.
      4. Confirm that only 60 tool cards are shown.
      5. Confirm that a paging bar is shown above the data.
      6. Click '2' in paging bar.
      7. Confirm that the next set of 60 tool cards are shown.
      8. Click 'Last' in paging bar.
      9. Confirm that there are 50 pages in total. (60 tool/page x 50 pages = 3000 tools).
      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 the load time is less than before the patch. 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 there are 50 pages in total. (60 tool/page x 50 pages = 3000 tools).

      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

            andrewmadden Andrew Madden
            gmrsagar Sagar Ghimire
            Misha Golenkov Misha Golenkov
            Ilya Tregubov Ilya Tregubov
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 22 minutes
                5h 22m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.