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

      <?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) Run this in a browser and confirm you see this:

      Show
      1) Create a test page  MDL-62678 -notify-alert.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) Run this in a browser and confirm you see this:
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_40_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
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated: