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

              Assignee:
              mr-russ Russell Smith
              Reporter:
              maherne Michael Aherne
              Peer reviewer:
              Tim Hunt
              Integrator:
              Marina Glancy
              Tester:
              Ankit Agarwal
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Mar/14