58 $this->activeIds = array();
59 $this->userIds = array();
60 $this->anonymousIds = array();
62 $this->byActiveId = array();
63 $this->byUserId = array();
64 $this->byAnonymousId = array();
67 public function load($testId)
77 ON ud.usr_id = ta.user_fi
79 AND {$this->getConditionalExpression()}
82 $res = $this->db->queryF(
$query, array(
'integer'), array($testId));
84 while(
$row = $this->db->fetchAssoc(
$res) )
86 $this->byActiveId[
$row[
'active_id'] ] =
$row;
88 if( $row[
'user_id'] == ANONYMOUS_USER_ID )
90 $this->byAnonymousId[ $row[
'anonymous_id'] ] =
$row;
94 $this->byUserId[ $row[
'user_id'] ] =
$row;
99 $this->
setUserIds(array_keys($this->byUserId));
105 $conditions = array();
109 $conditions[] = $this->db->in(
'active_id', $this->
getActiveIds(),
false,
'integer');
114 $conditions[] = $this->db->in(
'user_fi', $this->
getUserIds(),
false,
'integer');
119 $conditions[] = $this->db->in(
'anonymous_id', $this->
getAnonymousIds(),
false,
'integer');
122 if( count($conditions) )
124 return '('.implode(
' OR ', $conditions).
')';
162 return $this->byActiveId[$activeId][
'user_id'];
167 return "{$this->byActiveId[$activeId]['firstname']} {$this->byActiveId[$activeId]['lastname']}";
179 foreach($this->byActiveId as $activeId => $usrData)
192 $this->lng->txt(
'tst_participant_fullname_pattern'), $usrData[
'firstname'], $usrData[
'lastname']