original_string: public function get_num_tracked_users($where = '', $whereparams = array(), $groupid = 0) {
          global $DB;
  
          list($enrolledsql, $enrolledparams) = get_enrolled_sql(
                  context_course::instance($this->course->id), 'moodle/course:isincompletionreports', $groupid, true);
          $sql  = 'SELECT COUNT(eu.id) FROM (' . $enrolledsql . ') eu JOIN {user} u ON u.id = eu.id';
          if ($where) {
              $sql .= " WHERE $where";
          }
  
          $params = array_merge($enrolledparams, $whereparams);
          return $DB->count_records_sql($sql, $params);
      }
code: public function get_num_tracked_users($where = '', $whereparams = array(), $groupid = 0) {
          global $DB;
  
          list($enrolledsql, $enrolledparams) = get_enrolled_sql(
                  context_course::instance($this->course->id), 'moodle/course:isincompletionreports', $groupid, true);
          $sql  = 'SELECT COUNT(eu.id) FROM (' . $enrolledsql . ') eu JOIN {user} u ON u.id = eu.id';
          if ($where) {
              $sql .= " WHERE $where";
          }
  
          $params = array_merge($enrolledparams, $whereparams);
          return $DB->count_records_sql($sql, $params);
      }
code_tokens: public function get_num_tracked_users ( $ where = '' , $ whereparams = array ( ) , $ groupid = 0 ) { global $ DB ; list ( $ enrolledsql , $ enrolledparams ) = get_enrolled_sql ( context_course :: instance ( $ this -> course -> id ) , 'moodle/course:isincompletionreports' , $ groupid , true ) ; $ sql = 'SELECT COUNT(eu.id) FROM (' . $ enrolledsql . ') eu JOIN {user} u ON u.id = eu.id' ; if ( $ where ) { $ sql .= " WHERE $where" ; } $ params = array_merge ( $ enrolledparams , $ whereparams ) ; return $ DB -> count_records_sql ( $ sql , $ params ) ; }
docstring: Returns the number of users whose progress is tracked in this course.
  
  Optionally supply a search's where clause, or a group id.
  
  @param string $where Where clause sql (use 'u.whatever' for user table fields)
  @param array $whereparams Where clause params
  @param int $groupid Group id
  @return int Number of tracked users
docstring_tokens: Returns the number of users whose progress is tracked in this course .