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.
- Discovered while testing
-
MDL-46465 Code Checker reports an impressive 1427 errors and 423 warnings just in mod/chat
-
- Closed
-