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

Unused time limit variable in discussion posts tracking

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9.5, 3.0.3
    • Fix Version/s: 3.1
    • Component/s: Forum
    • Labels:
    • Testing Instructions:
      Hide

      For forum_get_all_discussion_posts, enter a discussion page and make sure there are no errors.
      For forum_get_discussions_count, enter a forum with a large number of discussions for paging and navigate between different pages.

      Show
      For forum_get_all_discussion_posts , enter a discussion page and make sure there are no errors. For forum_get_discussions_count , enter a forum with a large number of discussions for paging and navigate between different pages.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-53702_master

      Description

      The function forum_get_all_discussion_posts contains optional query for tracking information regarding the posts, along with two lines of code:

      $now = time();
      $cutoffdate = $now - ($CFG->forum_oldpostdays * 24 * 3600);

      However, $cutoffdate isn't used anywhere, which renders those lines useless.
      I've tracked this all the way up to V1.9 and it's not used even there. Since the lines are never used, maybe they should be removed.

      UPDATE:
      A similar issue appears in forum_get_discussions_count.

        Attachments

          Activity

            People

            Assignee:
            l.gil Lior Gil
            Reporter:
            l.gil Lior Gil
            Peer reviewer:
            Andrew Nicols
            Integrator:
            David Monllaó
            Tester:
            cameron1729
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              23/May/16