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

Wrong ids in unit tests - causes failures if an add-on a contexts on install

    XMLWordPrintable

Details

    Description

      In the unit test test_grade_edit_tree_column_range_get_item_cell, the id of an assignment is being used to find a context module instance. This should be using the cmid.

      For a vanilla checkout of Moodle, this happens to pass because the cmid and the id are both 1, but if your build includes other plugins which create course modules as part of their installation (e.g. oublog which uses a post_install hook to create a sitewide instance), then the unit test fails.

      Attachments

        Issue Links

          Activity

            People

              mr-russ Russell Smith
              maherne Michael Aherne
              Tim Hunt Tim Hunt
              Marina Glancy Marina Glancy
              Ankit Agarwal Ankit Agarwal
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Mar/14