public static function get_student_user_ids(\mod_assign\privacy\useridlist $useridlist) {
        $params = ['assignid' => $useridlist->get_assignid(), 'commentuserid' => $useridlist->get_teacherid(),
                'commentuserid2' => $useridlist->get_teacherid()];
        $sql = "SELECT DISTINCT c.userid AS id
                  FROM {comments} c
                  JOIN (SELECT c.itemid
                          FROM {comments} c
                          JOIN {assign_submission} s ON s.id = c.itemid AND s.assignment = :assignid
                         WHERE c.userid = :commentuserid) aa ON aa.itemid = c.itemid
                 WHERE c.userid NOT IN (:commentuserid2)";
        $useridlist->add_from_sql($sql, $params);
    }