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

Unnecessary AJAX request core_fetch_notifications on all pages

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a test page MDL-62678-notify-alert.php. Otherwise, you can download to the site root MDL-62678-notify-alert-on-same-page.php

        <?php
         
        include('config.php');
        $PAGE->set_url('/');
        $PAGE->set_context(context_system::instance());
        $PAGE->set_title('MDL-62678');
         
        require_login();
         
        \core\notification::info('1 before header, stored in session');
        echo $OUTPUT->header();
         
        \core\notification::info('2 before footer, rendered inline');
        echo $OUTPUT->footer();
         
        \core\notification::info('3 after footer, was ajax, now inline');
         
        \core\session\manager::write_close();
        \core\notification::info('4 was ignored, now inline');
        

      2. Confirm you see this:
      3. Download and run MDL-62678-notify-then-redirect.php
      4. Confirm that you get a redirection notification on the next page.
      5. Download and run MDL-62678-notify-while-redirecting.php
      6. Confirm that you get a redirection notification on the next page.

      NOTE: In steps 3 and 5, depending on your configuration, it may be required to remove the leading slash from the “/my/" path in the redirect() function. 

      Show
      Create a test page  MDL-62678 -notify-alert.php. Otherwise, you can download to the site root  MDL-62678-notify-alert-on-same-page.php <?php   include ( 'config.php' ); $PAGE ->set_url( '/' ); $PAGE ->set_context(context_system::instance()); $PAGE ->set_title( 'MDL-62678' );   require_login();   \core\notification::info( '1 before header, stored in session' ); echo $OUTPUT ->header();   \core\notification::info( '2 before footer, rendered inline' ); echo $OUTPUT ->footer();   \core\notification::info( '3 after footer, was ajax, now inline' );   \core\session\manager::write_close(); \core\notification::info( '4 was ignored, now inline' ); Confirm you see this: Download and run  MDL-62678-notify-then-redirect.php Confirm  that you get a redirection notification on the next page. Download and run  MDL-62678-notify-while-redirecting.php Confirm  that you get a redirection notification on the next page. NOTE : In steps 3 and 5, depending on your configuration, it may be required to remove the leading slash from the “/my/" path in the redirect()  function. 
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE
    • Pull 3.10 Branch:
      MDL-62678-core-fetch-notifications-MOODLE_310_STABLE
    • Pull Master Branch:
      MDL-62678-core-fetch-notifications

      Description

      Unnecessary AJAX request core_fetch_notifications on all pages

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              brendanheywood Brendan Heywood
              Reporter:
              cescobedo Carlos Escobedo
              Peer reviewer:
              Matt Porritt Matt Porritt
              Integrator:
              Víctor Déniz Falcón Víctor Déniz Falcón
              Tester:
              Anna Carissa Sadia Anna Carissa Sadia
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              3 Vote for this issue
              Watchers:
              14 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Nov/20

                  Time Tracking

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