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

Core test fails if modules have unusual addinstance capability defaults

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.9.4, 3.10.1
    • 3.9.2
    • Course

      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...

            quen Sam Marshall
            quen Sam Marshall
            Tim Hunt Tim Hunt
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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