original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Due to the fact that we can't rely on the queries in the mod_assign provider we have to add some additional sql.
  
  @param  \mod_assign\privacy\useridlist $useridlist An object for obtaining user IDs of students.
docstring_tokens: Due to the fact that we can t rely on the queries in the mod_assign provider we have to add some additional sql .