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

event_profile_field_test fails if a plugin has created additional categories

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.7.6, 3.8.2, 3.8.3
    • Fix Version/s: 3.7.7, 3.8.4
    • Component/s: User management
    • Labels:

      Description

      Steps to reproduce:

      1. Install attached local_test plugin. This creates 2 new user_info_categories records when it installs.
      2. Run PHPUnit init
      3. Run lib\tests\event_profile_field_test.php
        • Expected: Tests pass
        • Actual: test_user_info_category_updated_event fails, debugging message is generated "Debugging: Error: mdb->get_record() found more than one record!"

      This is because the categories created by the test have an absolute sortorder. If a plugin has created any at install, you might have multiple categories with the same sortoder.

        Attachments

        1. image-2020-05-19-10-16-59-905.png
          174 kB
          Janelle Barcega

          Issue Links

            Activity

              People

              Assignee:
              marxjohnson Mark Johnson
              Reporter:
              marxjohnson Mark Johnson
              Peer reviewer:
              Tim Hunt
              Integrator:
              Andrew Nicols
              Tester:
              Janelle Barcega
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Jul/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 40 minutes
                  1h 40m