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

Redundant code in block_navigation.php (backport of MDL-60019)



    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 3.4.6, 3.5.3, 3.6.1
    • Fix Version/s: None
    • Component/s: Blocks, Navigation, Performance
    • Labels:
    • Affected Branches:


      In MDL-60019 redundant code that did absolutely nothing was removed.  This I classified as a 'bug' because it is code that is wrong, serves no purpose and would have been as a result of a developer not updating the code correctly.  Thus a fault in implementation.

      In reading https://docs.moodle.org/dev/Integration_Review#Polite_note_about_bug_classification, I am not trying to 'game the system' as I have nothing to gain by this being backported apart from a few CPU cycles on a development machine with only one user!  I'm stating that it should be a 'bug' because it is my firm belief based on decades of programming experience that it is a 'bug'.  An 'improvement' is where code is altered to make things better for the user.  A 'bug' represents code that is faulty / wrong and in this case 'pointless' - broken pencil territory.  If a developer makes a coding mistake then it is a bug.  This is a coding mistake.

      I do see the point that it could be an 'improvement' because by removing the code it makes things better, however fixing 'bugs' are also 'improvements' because they make things better!

      If you consider the number of Moodle installations that you know of that will run Moodle 3.7- for years before places upgrade to M3.7, then surely that over time will have an impact?  How many page loads will happen for each user on each site using the navigation block?  Even with caching?

      I'm spending the time here because I believe in making Moodle better and if this initiates discussion which leads to improvements in policy which would then benefit other issues then that is a good thing.

      I'm sorry but Andrew's argument of 'Bigger fish to fry' does not wash with me, that's a 'sweep it under the carpet and hope it goes away' argument.  Details!  The details are the key to quality and avoiding 'You can't see the wood for the trees'.

      Removing this code should be a no-brainier!


          Issue Links



              stronk7 Eloy Lafuente (stronk7)
              gb2048 Gareth J Barnard
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              0 Vote for this issue
              2 Start watching this issue