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

Redundant call to time in format.php of topics course format

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.2
    • Component/s: Course
    • Labels:
      None
    • Environment:
      All

      Description

      In version 1.133 line 135 of format.php of the topics course format there is a call to time() which is assigned to the variable $timenow, but this variable is never used:

      $timenow = time();

      Therefore it is redundant and uses some processing time pointlessly.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            poltawski Dan Poltawski added a comment -

            I will push this change when we have a 2.1 development branch

            Show
            poltawski Dan Poltawski added a comment - I will push this change when we have a 2.1 development branch
            Hide
            gb2048 Gareth J Barnard added a comment -

            With respect Dan, if you wait until you have a branch will that not duplicate the issue into two branches? And then the fix will have to be applied twice. It is just a simple task of deleting the line - why the procrastination?

            Show
            gb2048 Gareth J Barnard added a comment - With respect Dan, if you wait until you have a branch will that not duplicate the issue into two branches? And then the fix will have to be applied twice. It is just a simple task of deleting the line - why the procrastination?
            Hide
            poltawski Dan Poltawski added a comment -

            Hi Gareth - I wait for a development branch because this is a minor issue of little consequence and its best not to make so many changes on the stable branch unless necessary.

            Submitting for integration now, sorry it took so long.

            Show
            poltawski Dan Poltawski added a comment - Hi Gareth - I wait for a development branch because this is a minor issue of little consequence and its best not to make so many changes on the stable branch unless necessary. Submitting for integration now, sorry it took so long.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Dan, this has been integrated now.
            Quite right in that this really only belongs in the master branch.

            Cheers
            Sam

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Dan, this has been integrated now. Quite right in that this really only belongs in the master branch. Cheers Sam
            Hide
            nebgor Aparup Banerjee added a comment -

            no errors seen.

            Show
            nebgor Aparup Banerjee added a comment - no errors seen.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Sent upstream and closing, many thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Sent upstream and closing, many thanks!

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/Dec/11