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

The reactive debug panel does not work with two reactive instance on the page

XMLWordPrintable

    • MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-76545-401
    • MDL-76545-master
    • Hide

      Test for Moodle 4.2+ (master branch)

      1. Login as admin
      2. Go to Administration --> Development --> Debugging
        1. "Set Debug messages" to DEVELOPER
        2. Check "Display debug messages"
        3. Check "Performance info"
        4. Click on "Save changes"
      3. Create a course and go there with edit mode on
      4. Go to the footer of the page
        1. Check that the "Reactive instances" have two buttons: "ProcessMonitor" and "CourseEditor*" (Where * is the course ID)

      Test for Moodle 4.1 and 4.0

      1. Login as admin
      2. Go to Administration --> Development --> Debugging
        1. "Set Debug messages" to DEVELOPER
        2. Check "Display debug messages"
        3. Check "Performance info"
        4. Click on "Save changes"
      3. Create a course in topics format with edit mode on
      4. Add a text and media element into the first topic and edit the content
      5. In the atto editor, click on show more options and the in the HTML button to edit directly in HTML.
      6. Copy the HTML content from below this list
      7. Save the text and media content and go to the course page
      8. Go to the footer of the page
        1. Check that the "Reactive instances" have two buttons: "example" and "CourseEditor*" (Where * is the course ID)

      HTML content to copy into the text and media element:

      <script>
          const eventName = 'qwerty';
          const eventDispatch = (detail, target) => {
              if (target === undefined) {
                  target = document;
              }
              target.dispatchEvent(new CustomEvent(
                  eventName,
                  {bubbles: true, detail: detail}
              ));
          };
          const createReactive = () => {
              require(
                  ['core/reactive'],
                  function(library) {
                      new library.Reactive({
                          name: 'example',
                          eventName,
                          eventDispatch,
                      });
                  }
              );
          };
          window.addEventListener('load', createReactive);
          window.console.log('Extra reactive loaded');
      </script> 

      Show
      Test for Moodle 4.2+ (master branch) Login as admin Go to Administration --> Development --> Debugging "Set Debug messages" to DEVELOPER Check "Display debug messages" Check "Performance info" Click on "Save changes" Create a course and go there with edit mode on Go to the footer of the page Check that the "Reactive instances" have two buttons: "ProcessMonitor" and "CourseEditor*" (Where * is the course ID) Test for Moodle 4.1 and 4.0 Login as admin Go to Administration --> Development --> Debugging "Set Debug messages" to DEVELOPER Check "Display debug messages" Check "Performance info" Click on "Save changes" Create a course in topics format with edit mode on Add a text and media element into the first topic and edit the content In the atto editor, click on show more options and the in the HTML button to edit directly in HTML. Copy the HTML content from below this list Save the text and media content and go to the course page Go to the footer of the page Check that the "Reactive instances" have two buttons: "example" and "CourseEditor*" (Where * is the course ID) HTML content to copy into the text and media element: <script>     const eventName = 'qwerty' ;     const eventDispatch = (detail, target) => {         if (target === undefined) {             target = document;         }         target.dispatchEvent( new CustomEvent(             eventName,             {bubbles: true , detail: detail}         ));     };     const createReactive = () => {         require(             [ 'core/reactive' ],             function(library) {                 new library.Reactive({                     name: 'example' ,                     eventName,                     eventDispatch,                 });             }         );     };     window.addEventListener( 'load' , createReactive);     window.console.log( 'Extra reactive loaded' ); </script>
    • HQ Sprint 1.2 Moppies

      During MDL-76432 I found the reactive debug panel does not work properly when two reactive instances are used on the same page.

      Now that the course has two reactive elements (the course editor and the upload panel) It is quite easy to reproduce:

      • Have the debug level in developer mode and show debug information
      • Access the course in edit mode
      • Go to the footer
      • Expected: the debug panel has two buttons, one for the course editor and one for the process panel
      • What happens: the debug panel show that there are not reactive instances there.

       

        1. 400_STABLE_01.png
          400_STABLE_01.png
          34 kB
        2. 400_STABLE_02.png
          400_STABLE_02.png
          39 kB
        3. 401_STABLE_01.png
          401_STABLE_01.png
          34 kB
        4. 401_STABLE_02.png
          401_STABLE_02.png
          42 kB
        5. master_01.png
          master_01.png
          41 kB
        6. master_02.png
          master_02.png
          42 kB

            tusefomal Ferran Recio
            tusefomal Ferran Recio
            Carlos Escobedo Carlos Escobedo
            Amaia Anabitarte Amaia Anabitarte
            Safat Shahin Safat Shahin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 4 hours, 40 minutes
                1d 4h 40m

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