From 20bbcbe547cea81a6b12ffda24de9da4ae02d783 Mon Sep 17 00:00:00 2001 From: univiest <143176574+univiest@users.noreply.github.com> Date: Fri, 25 Aug 2023 11:48:00 +0200 Subject: [PATCH] fix #158 --- classes/anonymous.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/anonymous.php b/classes/anonymous.php index c098dc8bce..ea593c94d6 100644 --- a/classes/anonymous.php +++ b/classes/anonymous.php @@ -94,7 +94,7 @@ public static function get_userid_mapping($moodleoverflow, $discussionid) { $userids = $DB->get_records_sql( 'SELECT userid ' . 'FROM {moodleoverflow_posts} ' . - 'WHERE discussion = :discussion' . + 'WHERE discussion = :discussion ' . 'GROUP BY userid ' . 'ORDER BY MIN(created) ASC;', ['discussion' => $discussionid]);