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

chat/lib.php chat_print_recent_activity() has an empty if block

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Trivial Trivial
    • None
    • 2.6.4
    • Chat
    • MOODLE_26_STABLE

      if (!$users = $DB->get_records_sql("SELECT $userfields
                                                        FROM {course_modules} cm
                                                        JOIN {chat} ch        ON ch.id = cm.instance
                                                        JOIN {chat_users} chu ON chu.chatid = ch.id
                                                        JOIN {user} u         ON u.id = chu.userid
                                                       WHERE cm.id = :cmid $timeout $groupselect
                                                    GROUP BY $userfields", $params)) {
                  }
      

      I suspect the if can just be removed. The code below it has a guard around to prevent errors. Alternatively maybe want to leave the if in but put a debugging call in there. Either way we shouldn't be doing what we are doing now.

            Unassigned Unassigned
            andyjdavis Andrew Davis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.