$this->rs->MoveNext();
}
- public function rewind() {
- $this->rs->MoveFirst();
- }
-
public function valid() {
return !$this->rs->EOF;
}
//public abstract function next();
/**
- * Revinds back to the first row
+ * Revinds are not supported!
* @return void
*/
- //public abstract function rewind();
+ public function rewind() {
+ // no seeking, sorry - let's ignore it ;-)
+ return;
+ }
/**
* Did we reach the end?
$this->current = $this->fetch_next();
}
- public function rewind() {
- // we can not seek, sorry - let's ignore it ;-)
- }
-
public function valid() {
return !empty($this->current);
}
return $this->fields !== false;
}
- public function rewind() {
- $this->fields = $this->sth->fetch();
- if ($this->fields) {
- $this->rowCount = 0;
- }
- }
-
public function valid() {
if($this->rowCount < 0) {
$this->rewind();
$this->current = $this->fetch_next();
}
- public function rewind() {
- // we can not seek, sorry - let's ignore it ;-)
- }
-
public function valid() {
return !empty($this->current);
}
// of rows anyway. On a large course it will explode badly...
//
if ($mode===MODE_ENROLDETAILS) {
- $userids = array();
-
- foreach ($userlist as $user) {
- $userids[] = $user->id;
+ if ($context->id != $frontpagectx->id) {
+ $userids = $DB->get_fieldset_sql("SELECT DISTINCT u.id $from $where $wheresearch $sort", $params,
+ $table->get_page_start(), $table->get_page_size());
+ } else {
+ $userids = $DB->get_fieldset_sql("SELECT u.id $from $where $wheresearch $sort", $params,
+ $table->get_page_start(), $table->get_page_size());
}
$userlist_extra = get_participants_extra($userids, $avoidroles, $course, $context);
-
- // Only Oracle cannot seek backwards
- // and must re-query...
- $userlist->rewind();
}
if ($context->id == $frontpagectx->id) {