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

Improve the loading time of the course index when the user is not in the course page

XMLWordPrintable

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-73547-master-v03
    • Hide

      Testing scenario

      1. Create a topics format course with completion tracking
      2. Add some topics and at least one activity with manual completion and one with automatic completion when the student view the activity
      3. Create a user and enrol it as a student into the course
      4. Login as the student (but don't access the course yet)
      5. Open the browser dev tools (F12 in chrome), then go to the Network tab and write "state" into the filter (otherwise it will be hard to see the state request)

      Test 1: basic test

      1. Access the course as the student
        1. Check that the network tool shows one connection to get the state.
        2. Check the course index is displayed
      2. Refresh the page
        1. Check that there is no get state connection in the network tool
        2. Check the course index is displayed
      3. Go inside one activity
        1. Check that there is no get state connection in the network tool
        2. Check the course index is displayed

      Test 2: editing the course

      1. Access the course as the student
        1. Check the course index is displayed
      2. Refresh the page
        1. Check that there is no get state connection in the network tool
        2. Check the course index is displayed
      3. Open another browser, login as admin, and edit the course (for example changing the order of the activities). Then you can close the window we don't need the admin anymore.
      4. Refresh the student browser
        1. Check that the network tool shows one connection to get the state.
        2. Check the course index is displayed
      5. Refresh again the student browser
        1. Check that there is no get state connection in the network tool
        2. Check the course index is displayed

      Test 3: manual completion

      1. Access the course as the student
      2. Refresh the page
        1. Check that there is no get state connection in the network tool
        2. Check the course index is displayed
      3. Click on the manual completion button of one activity
        1. Check the activity is marked as completed in the course index
      4. Refresh the page 
        1. Check that the network tool shows one connection to get the state.
        2. Check the course index is displayed with the correct activity completion

      Test 4: automatic completion

      1. Access the course as the student
      2. Refresh the page
        1. Check that there is no get state connection in the network tool
        2. Check the course index is displayed
      3. Access the activity with view automatic completion
      4. Refresh the page 
        1. Check that the network tool shows one connection to get the state.
        2. Check the course index is displayed with the correct activity completion

      Test 5: user preference

      1. Access the course as the student
      2. Refresh the page
        1. Check that there is no get state connection in the network tool
        2. Check the course index is displayed
      3. Collapse one section in the course index
      4. Refresh the page 
        1. Check that the network tool shows one connection to get the state.
        2. Check the course index is displayed
        3. Check the section remains is collapsed
      Show
      Testing scenario Create a topics format course with completion tracking Add some topics and at least one activity with manual completion and one with automatic completion when the student view the activity Create a user and enrol it as a student into the course Login as the student (but don't access the course yet) Open the browser dev tools (F12 in chrome), then go to the Network tab and write "state" into the filter (otherwise it will be hard to see the state request) Test 1: basic test Access the course as the student Check that the network tool shows one connection to get the state. Check the course index is displayed Refresh the page Check that there is no get state connection in the network tool Check the course index is displayed Go inside one activity Check that there is no get state connection in the network tool Check the course index is displayed Test 2: editing the course Access the course as the student Check the course index is displayed Refresh the page Check that there is no get state connection in the network tool Check the course index is displayed Open another browser, login as admin, and edit the course (for example changing the order of the activities). Then you can close the window we don't need the admin anymore. Refresh the student browser Check that the network tool shows one connection to get the state. Check the course index is displayed Refresh again the student browser Check that there is no get state connection in the network tool Check the course index is displayed Test 3: manual completion Access the course as the student Refresh the page Check that there is no get state connection in the network tool Check the course index is displayed Click on the manual completion button of one activity Check the activity is marked as completed in the course index Refresh the page  Check that the network tool shows one connection to get the state. Check the course index is displayed with the correct activity completion Test 4: automatic completion Access the course as the student Refresh the page Check that there is no get state connection in the network tool Check the course index is displayed Access the activity with view automatic completion Refresh the page  Check that the network tool shows one connection to get the state. Check the course index is displayed with the correct activity completion Test 5: user preference Access the course as the student Refresh the page Check that there is no get state connection in the network tool Check the course index is displayed Collapse one section in the course index Refresh the page  Check that the network tool shows one connection to get the state. Check the course index is displayed Check the section remains is collapsed
    • Moppies Kanban

      Since MDL-73310 the course index appears in all pages related to the course, not only in activities and the course view. This implies that in most pages the course index content can be fully cached to speed up the page loading.

      All those new pages with the course index cannot alter the course structure itself so they can use the previously loaded version of the course index. This does not happen with the course index and activity pages as they can, for example, alter the activity completion.

        1. Screen Shot 2022-02-25 at 1.13.14 pm.png
          189 kB
          Mathew May
        2. Screen Shot 2022-02-25 at 1.13.24 pm.png
          178 kB
          Mathew May
        3. Screen Shot 2022-02-25 at 1.13.43 pm.png
          180 kB
          Mathew May
        4. Screen Shot 2022-02-25 at 1.14.15 pm.png
          191 kB
          Mathew May
        5. Screen Shot 2022-02-25 at 1.14.30 pm.png
          180 kB
          Mathew May
        6. Screen Shot 2022-02-25 at 1.14.44 pm.png
          177 kB
          Mathew May
        7. Screen Shot 2022-02-25 at 1.15.03 pm.png
          176 kB
          Mathew May
        8. Screen Shot 2022-02-25 at 1.15.14 pm.png
          187 kB
          Mathew May
        9. Screen Shot 2022-02-25 at 1.15.26 pm.png
          178 kB
          Mathew May
        10. Screen Shot 2022-02-25 at 1.15.59 pm.png
          182 kB
          Mathew May
        11. Screen Shot 2022-02-25 at 1.16.15 pm.png
          178 kB
          Mathew May
        12. Screen Shot 2022-02-25 at 1.16.36 pm.png
          178 kB
          Mathew May

            tusefomal Ferran Recio
            tusefomal Ferran Recio
            Carlos Escobedo Carlos Escobedo
            Andrew Lyons Andrew Lyons
            Mathew May Mathew May
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 1 day, 2 hours, 30 minutes
                1w 1d 2h 30m

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