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

Multiple problems with forum_set_user_maildigest

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.6.1
    • Fix Version/s: FRONTEND
    • Component/s: Forum
    • Labels:

      Description

      1. '@throws invalid_digest_setting' is not correct
      2. The param $forum accepts numeric arguments to retrieve a forum from the database
        1. This is not documented
        2. is_numeric() will accept floats, general moodle convention is to do !is_object() on the object
        3. We support this mechanism in old APIs, but its the path to poor performance and we should just remove it and require the forum object as the calling code does.
      3. There is an unnecessary database call to get the course - should just use $forum->course

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              poltawski Dan Poltawski
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated: