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

core_accesslib_testcase uses wrong values

    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.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            cibot CiBoT added a comment -
            Show
            cibot CiBoT added a comment - Results for MDL-45148 Remote repository: https://github.com/mackensen/moodle Remote branch wip- MDL-45148 -master to be integrated into upstream master Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/3048 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/3048/artifact/work/smurf.html
            Hide
            ankit_frenz Ankit Agarwal added a comment -

            Hi Charles,
            That is a nice catch, the patch looks good.

            Please consider backporting it to stables. Will push for integration, once stable branches are up.

            Thanks

            Show
            ankit_frenz Ankit Agarwal added a comment - Hi Charles, That is a nice catch, the patch looks good. Please consider backporting it to stables. Will push for integration, once stable branches are up. Thanks
            Hide
            cfulton Charles Fulton added a comment -

            Thanks Ankit Agarwal, stable branches pushed.

            Show
            cfulton Charles Fulton added a comment - Thanks Ankit Agarwal , stable branches pushed.
            Hide
            poltawski Dan Poltawski added a comment -

            Thanks Charles - integrated to master, 26 and 25

            Show
            poltawski Dan Poltawski added a comment - Thanks Charles - integrated to master, 26 and 25
            Hide
            poltawski Dan Poltawski added a comment -

            Thank you for your contributions reporting, testing, developing, peer reviewing, pinging and helping this issue to get fixed!

            It's now part of Moodle!

            We couldn't have done it without you!

            Show
            poltawski Dan Poltawski added a comment - Thank you for your contributions reporting, testing, developing, peer reviewing, pinging and helping this issue to get fixed! It's now part of Moodle! We couldn't have done it without you!

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

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