68 $this->activeIdsFilter = array();
69 $this->userIdsFilter = array();
70 $this->anonymousIdsFilter = array();
72 $this->byActiveId = array();
73 $this->byUserId = array();
74 $this->byAnonymousId = array();
76 $this->scoredParticipantsFilterEnabled =
false;
113 $this->byActiveId = array();
114 $this->byUserId = array();
125 LEFT JOIN usr_data ud 126 ON ud.usr_id = ta.user_fi 128 AND {$this->getConditionalExpression()} 129 AND {$this->getScoredParticipantsFilterExpression()} 132 $res = $this->db->queryF(
$query, array(
'integer'), array($testId));
135 $accessFilteredUsrIds = array();
137 while (
$row = $this->db->fetchAssoc(
$res)) {
138 $accessFilteredUsrIds[] =
$row[
'user_id'];
147 if (!in_array($row[
'user_id'], $accessFilteredUsrIds)) {
151 $this->byActiveId[ $row[
'active_id'] ] =
$row;
153 if ($row[
'user_id'] == ANONYMOUS_USER_ID) {
154 $this->byAnonymousId[ $row[
'anonymous_id'] ] =
$row;
156 $this->byUserId[ $row[
'user_id'] ] =
$row;
164 return "ta.last_finished_pass = ta.last_started_pass";
172 $conditions = array();
175 $conditions[] = $this->db->in(
'active_id', $this->
getActiveIdsFilter(),
false,
'integer');
179 $conditions[] = $this->db->in(
'user_fi', $this->
getUserIdsFilter(),
false,
'integer');
186 if (count($conditions)) {
187 return '(' . implode(
' OR ', $conditions) .
')';
225 return array_keys($this->byActiveId);
230 return array_keys($this->byUserId);
235 return array_keys($this->byAnonymousId);
240 return $this->byActiveId[$activeId][
'user_id'];
245 return $this->byUserId[$userId][
'active_id'];
250 return "{$this->byActiveId[$activeId]['firstname']} {$this->byActiveId[$activeId]['lastname']}";
260 $fullname = str_replace(
' ',
'', $this->byActiveId[$activeId][
'lastname']);
261 $fullname .=
'_' . str_replace(
' ',
'', $this->byActiveId[$activeId][
'firstname']);
262 $fullname .=
'_' . $this->byActiveId[$activeId][
'login'];
271 foreach ($this->byActiveId as $activeId => $usrData) {
283 $this->lng->txt(
'tst_participant_fullname_pattern'),
284 $usrData[
'firstname'],
291 $anonymousActiveIds = array();
293 foreach ($this->byActiveId as $activeId => $active) {
294 if ($active[
'user_id'] == ANONYMOUS_USER_ID) {
295 $anonymousActiveIds[] = $activeId;
299 return $anonymousActiveIds;
304 if (isset($this->byActiveId[$activeId])) {
305 return $this->byActiveId[$activeId];
__construct(ilDBInterface $db, ilLanguage $lng)
setAnonymousIdsFilter($anonymousIdsFilter)
$scoredParticipantsFilterEnabled
getUserDataByActiveId($activeId)
getConcatedFullnameByActiveId($activeId)
setParticipantAccessFilter($participantAccessFilter)
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
setUserIdsFilter($userIdsFilter)
getConditionalExpression()
getFormatedFullnameByActiveId($activeId)
foreach($_POST as $key=> $value) $res
setScoredParticipantsFilterEnabled($scoredParticipantsFilterEnabled)
buildFormatedFullname($usrData)
getActiveIdByUserId($userId)
getParticipantAccessFilter()
getScoredParticipantsFilterExpression()
getFileSystemCompliantFullnameByActiveId($activeId)
getUserIdByActiveId($activeId)
isScoredParticipantsFilterEnabled()
setActiveIdsFilter($activeIdsFilter)