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

tiny waste of time in lib/accesslib.php

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.6.6, 2.7.3
    • 2.6.5, 2.7.2, 2.8
    • Other
    • MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • MDL-47594_master
    • Easy
    • Hide

      Buy an atomic clock and verify each call to lib/accesslib.php saves few nanoseconds
      or
      look at the code and verify the following code
      if (empty($CFG->profileroles))

      { return array(); }

      no longer exists from line 3113 of 7lib/accesslib.php.

      More seriously: run unit tests lib/tests/accesslib_test.php

      Show
      Buy an atomic clock and verify each call to lib/accesslib.php saves few nanoseconds or look at the code and verify the following code if (empty($CFG->profileroles)) { return array(); } no longer exists from line 3113 of 7lib/accesslib.php. More seriously: run unit tests lib/tests/accesslib_test.php

      Please read the code in
      https://github.com/moodle/moodle/blob/master/lib/accesslib.php#L3103
      and in
      https://github.com/moodle/moodle/blob/master/lib/accesslib.php#L3113

      As far as I can understand, the code in 3113 is a waste of time.

            daniss Daniele Cordella
            daniss Daniele Cordella
            Simey Lameze Simey Lameze
            Sam Hemelryk Sam Hemelryk
            Mark Nelson Mark Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.