Redundant code in block_navigation.php

Redundant code in block_navigation.php

by Gareth J Barnard -
Number of replies: 3
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello,

Before I raise an MDL.... In M3.1, 3.2 and 3.3 '/blocks/navigation/block_navigation.php', method 'get_content' there is the code:

        $arguments = array(
            'id'             => $this->instance->id,
            'instance'       => $this->instance->id,
            'candock'        => $this->instance_can_be_docked(),
            'courselimit'    => $limit,
            'expansionlimit' => $expansionlimit
        );

Which appears unused.  Can anybody confirm this please?  I know its not much but would save a bit of CPU time if it was removed.

Note: This also means that the value of '$CFG->navcourselimit' is not used / taken into account.

G


Average of ratings: -
In reply to Gareth J Barnard

Re: Redundant code in block_navigation.php

by Deepak Gour -

Hi Gareth

Please don't touch core code.

If you change core code maybe you will face lot for problem. 

In reply to Deepak Gour

Re: Redundant code in block_navigation.php

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Deepak,

With respect I do have a 'core developers' badge so know what I'm doing to follow the correct procedure to change core code.

Kind regards,

Gareth