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)
69 $this->byActiveId = array();
70 $this->byUserId = array();
82 ON ud.usr_id = ta.user_fi
84 AND {$this->getConditionalExpression()}
87 $res = $this->db->queryF(
$query, array(
'integer'), array($testId));
89 while (
$row = $this->db->fetchAssoc(
$res)) {
90 $this->byActiveId[
$row[
'active_id'] ] =
$row;
92 if (
$row[
'user_id'] == ANONYMOUS_USER_ID) {
93 $this->byAnonymousId[
$row[
'anonymous_id'] ] =
$row;
95 $this->byUserId[
$row[
'user_id'] ] =
$row;
100 $this->
setUserIds(array_keys($this->byUserId));
106 $conditions = array();
109 $conditions[] = $this->db->in(
'active_id', $this->
getActiveIds(),
false,
'integer');
113 $conditions[] = $this->db->in(
'user_fi', $this->
getUserIds(),
false,
'integer');
117 $conditions[] = $this->db->in(
'anonymous_id', $this->
getAnonymousIds(),
false,
'integer');
120 if (count($conditions)) {
121 return '(' . implode(
' OR ', $conditions) .
')';
159 return $this->byActiveId[$activeId][
'user_id'];
164 return $this->byUserId[$userId][
'active_id'];
169 return "{$this->byActiveId[$activeId]['firstname']} {$this->byActiveId[$activeId]['lastname']}";
179 $fullname = str_replace(
' ',
'', $this->byActiveId[$activeId][
'lastname']);
180 $fullname .=
'_' . str_replace(
' ',
'', $this->byActiveId[$activeId][
'firstname']);
181 $fullname .=
'_' . $this->byActiveId[$activeId][
'login'];
190 foreach ($this->byActiveId as $activeId => $usrData) {
202 $this->lng->txt(
'tst_participant_fullname_pattern'),
203 $usrData[
'firstname'],
210 $anonymousActiveIds = array();
212 foreach ($this->byActiveId as $activeId => $active) {
213 if ($active[
'user_id'] == ANONYMOUS_USER_ID) {
214 $anonymousActiveIds[] = $activeId;
218 return $anonymousActiveIds;
223 if (isset($this->byActiveId[$activeId])) {
224 return $this->byActiveId[$activeId];
sprintf('%.4f', $callTime)
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
getFileSystemCompliantFullnameByActiveId($activeId)
getUserIdByActiveId($activeId)
getActiveIdByUserId($userId)
buildFormatedFullname($usrData)
__construct(ilDBInterface $db, ilLanguage $lng)
getConditionalExpression()
getFormatedFullnameByActiveId($activeId)
setAnonymousIds($anonymousIds)
getUserDataByActiveId($activeId)
getConcatedFullnameByActiveId($activeId)
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
foreach($_POST as $key=> $value) $res