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

core_accesslib_testcase uses wrong values

    XMLWordPrintable

    Details

      Description

      There are several places in core_accesslib_testcase where a new teacher is created and that teacher's id is passed instead of the expected role id. This probably happened because in different parts of the code $teacher can mean either a teacher role or the new teacher. The unit tests still pass because the tests use editingteacher (default role id is 3) and the generated teacher has an id of 3. There's no intrinsic reason for this to be the case, and if you're ever running a custom environment which starts with more than two users before this test begins then it will fail.

        Attachments

          Activity

            People

            • Assignee:
              cfulton Charles Fulton
              Reporter:
              cfulton Charles Fulton
              Peer reviewer:
              Ankit Agarwal
              Integrator:
              Dan Poltawski
              Tester:
              Dan Poltawski
              Participants:
              Component watchers:
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/May/14