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

useless db query that should be deleted

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8
    • Fix Version/s: 2.9
    • Component/s: Lesson
    • Labels:

      Description

      I found a very tiny waste of time in mod_lesson core code. It is 100% NOT AN ERROR but only a waste of time.
      It consists in a useless query to the db.
      It is in https://github.com/moodle/moodle/blob/master/mod/lesson/lib.php#L54
      As you can see, the query is useless because $lesson is never used and $lesson->id is already known.

        Attachments

          Activity

            People

            Assignee:
            jmvedrine Jean-Michel Vedrine
            Reporter:
            daniss Daniele Cordella
            Peer reviewer:
            Ankit Agarwal Ankit Agarwal
            Integrator:
            Dan Poltawski Dan Poltawski
            Tester:
            CiBoT CiBoT
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/May/15