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

Review all instances of require_login() to use course object instead of course id

    Details

      Description

      In many places we already have course object fetched but still pass $course->id as argument to require_login().
      This leads to an extra un-necessary call to DB. All uses to require_login() should be reviewed and course object should be used as argument whenever possible.

      attaching a basic grep output of such cases(should not be considered conclusive).

        Gliffy Diagrams

          Attachments

            Activity

            ankit_frenz Ankit Agarwal created issue -
            ankit_frenz Ankit Agarwal made changes -
            Field Original Value New Value
            Issue Type Bug [ 1 ] Improvement [ 4 ]
            salvetore Michael de Raadt made changes -
            Fix Version/s STABLE backlog [ 10463 ]
            Priority Minor [ 4 ] Major [ 3 ]
            Labels triaged
            Component/s Performance [ 10221 ]
            skodak Petr Skoda made changes -
            Assignee Rajesh Taneja [ rajeshtaneja ] Petr Škoda (skodak) [ skodak ]
            skodak Petr Skoda made changes -
            Status Open [ 1 ] Development in progress [ 3 ]
            skodak Petr Skoda made changes -
            Fix Version/s 2.3 [ 10657 ]
            Fix Version/s STABLE backlog [ 10463 ]
            skodak Petr Skoda made changes -
            Status Development in progress [ 3 ] Waiting for integration review [ 10010 ]
            Pull Master Diff URL https://github.com/skodak/moodle/compare/master...w17_MDL-31607_m23_login
            Pull Master Branch w17_MDL-31607_m23_login
            Pull from Repository git://github.com/skodak/moodle.git
            Testing Instructions I guess it is too many pages to test, so careful review could be enough...
            stronk7 Eloy Lafuente (stronk7) made changes -
            Currently in integration Yes [ 10041 ]
            poltawski Dan Poltawski made changes -
            Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
            Integrator poltawski
            poltawski Dan Poltawski made changes -
            Testing Instructions I guess it is too many pages to test, so careful review could be enough... Tester needs to be a developer.

            * Review each file changed ensuring that the $course object is retrieved from DB before use in require_login()
            poltawski Dan Poltawski made changes -
            Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
            salvetore Michael de Raadt made changes -
            Tester ankit_frenz
            ankit_frenz Ankit Agarwal made changes -
            Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
            ankit_frenz Ankit Agarwal made changes -
            Status Testing in progress [ 10011 ] Tested [ 10006 ]
            stronk7 Eloy Lafuente (stronk7) made changes -
            Status Tested [ 10006 ] Closed [ 6 ]
            Resolution Fixed [ 1 ]
            Currently in integration Yes [ 10041 ]
            Integration date 27/Apr/12

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Jun/12