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

Core test fails if modules have unusual addinstance capability defaults

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.9.2
    • Fix Version/s: 3.9.4, 3.10.1
    • Component/s: Course
    • Labels:

      Description

      There is a test:
      tests\course\services_content_item_service_testcase.test_get_all_content_items

      It includes this code:

              // The call to get_all_content_items() should return the same items as for the course,
              // given the user in an editing teacher and can add manual lti instances.
              $this->assertEquals(array_column($allcontentitems, 'name'), array_column($coursecontentitems, 'name'));
      

      The effect of this is that if you have any custom activity module plugins which define unusual default values for their addinstance capability, in which 'editingteacher' archetype does NOT get the capability by default (e.g. set the archetypes array to empty), then the test fails.

      We are setting it as a known failure in our infrastructure, but it would be nice if the test were changed so it didn't do that (e.g. could filter both lists of plugins to include only selected/all core plugins). To be honest I don't know what it's really supposed to be testing but I haven't looked in detail...

        Attachments

          Activity

            People

            Assignee:
            quen Sam Marshall
            Reporter:
            quen Sam Marshall
            Peer reviewer:
            Tim Hunt
            Integrator:
            Sara Arjona (@sarjona)
            Tester:
            CiBoT
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              18/Jan/21

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 25 minutes
                25m