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

Load the calendar blocks after page load

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4
    • Fix Version/s: 3.5
    • Component/s: Blocks, Calendar
    • Labels:
    • Testing Instructions:
      Hide

       Setup

      1. Download create_events.php to your moodle root folder.
      2. Open your terminal and go to your moodle root folder.
      3. Run the script to create a bunch of events:

        php create_events.php

      Logged in user

      1. Log in as admin
      2. Go to the calendar
      3. CONFIRM that the “MONTHLY VIEW” loads the events after the page has rendered (you should see the little loading symbol flash over it)
      4. Add a new site event for today
      5. After the MONTHLY VIEW block has finished loading, Hover on the day in the "MONTHLY VIEW" in which you created the site event.
      6. CONFIRM that you can see the event that you created.
      7. Go to the site home
      8. Turn editing on
      9. Add the calendar block
      10. Turn editing off
      11. Reload the page
      12. CONFIRM that the calendar block loads the events after the page has rendered
      13. CONFIRM that you see the site event in the calendar

      Logged out user

      1. Log out of the site
      2. CONFIRM that you still see the calendar block and that it doesn’t load after the page is rendered. Instead, the block will load its content as part of the page render.
      3. CONFIRM that you see the site event in the block
      Show
       Setup Download create_events.php to your moodle root folder. Open your terminal and go to your moodle root folder. Run the script to create a bunch of events: php create_events.php Logged in user Log in as admin Go to the calendar CONFIRM that the “MONTHLY VIEW” loads the events after the page has rendered (you should see the little loading symbol flash over it) Add a new site event for today After the MONTHLY VIEW block has finished loading, Hover on the day in the "MONTHLY VIEW" in which you created the site event. CONFIRM that you can see the event that you created. Go to the site home Turn editing on Add the calendar block Turn editing off Reload the page CONFIRM that the calendar block loads the events after the page has rendered CONFIRM that you see the site event in the calendar Logged out user Log out of the site CONFIRM that you still see the calendar block and that it doesn’t load after the page is rendered. Instead, the block will load its content as part of the page render. CONFIRM that you see the site event in the block
    • Affected Branches:
      MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE
    • Pull Master Branch:
      MDL-60962-master

      Description

      We should load the calendar block and the 3 month block on the calendar page asynchronously after page load rather than blocking the page from rendering.

      Loading this content can be time consuming and it's likely not the primary focus of the page given it's a block so we shouldn't delay loading the page for it.

        Attachments

        1. 6-event created displayed.png
          114 kB
          Rayna Mae Jayco
        2. calendar block loads the events after the page.png
          104 kB
          Rayna Mae Jayco
        3. create_events.php
          6 kB
          Jun Pataleta
        4. loads events after page.png
          116 kB
          Rayna Mae Jayco
        5. logged out user.png
          119 kB
          Rayna Mae Jayco
        6. site event displayed in calendar block.png
          109 kB
          Rayna Mae Jayco

          Issue Links

            Activity

              People

              Assignee:
              ryanwyllie Ryan Wyllie
              Reporter:
              ryanwyllie Ryan Wyllie
              Peer reviewer:
              Mihail Geshoski
              Integrator:
              Jun Pataleta
              Tester:
              Rayna Mae Jayco
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                17/May/18