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

Unexpected debugging messages on external groups related API functions

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      It's hard to test as you need to triger required API functions using webservices.

      Potentially the way to test is following:

      • make sure you have debugghing on
      • revert changes from group/externallib.php, but keep changes in group/tests/externallib_test.php
      • run unit tests like vendor/bin/phpunit group/tests/externallib_test.php
      • ensure that you got described debugging messages and the test fail with errors
      • apply patch back to group/externallib.php and run tests again
      • ensure that all tests passed
      Show
      It's hard to test as you need to triger required API functions using webservices. Potentially the way to test is following: make sure you have debugghing on revert changes from group/externallib.php, but keep changes in group/tests/externallib_test.php run unit tests like vendor/bin/phpunit group/tests/externallib_test.php ensure that you got described debugging messages and the test fail with errors apply patch back to group/externallib.php and run tests again ensure that all tests passed
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
      MDL-63516-MOODLE_35_STABLE
    • Pull Master Branch:
      MDL-63516-master

      Description

      When using webservices or just external API functions for managing groups and grouping an  unexpected debugging messages pop up in the log (or screen).

      List of functions external functions:

      • add_group_members
      • delete_group_members
      • delete_groupings

      Messages in the logs/screen: 

      Unexpected debugging() call detected. Debugging: Fields list in snapshot record does not match fields list in 'groupings'. Record is missing fields: name, idnumber, description, descriptionformat, configdata, timecreated, timemodified

      This happens because not fully loaded object gets passed to a related event (e.g. to  \core\event\grouping_deleted).

        Attachments

          Activity

            People

            Assignee:
            dmitriim Dmitrii Metelkin
            Reporter:
            dmitriim Dmitrii Metelkin
            Peer reviewer:
            Matt Porritt
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Eloy Lafuente (stronk7)
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/Mar/19