71 if ($obj->isMixedContentType()) {
72 foreach ($this->response as $item) {
73 $userIdent = str_replace(
'mailto:',
'', $item[
'mbox']);
74 if (empty($userIdent)) {
75 $userIdent = $item[
'account'];
77 $cmixUser = $this->cmixUsersByIdent[$userIdent];
79 'user_ident' => $userIdent,
83 'score' => $item[
'score'][
'scaled'],
84 'ilias_user_id' => $cmixUser->getUsrId()
88 foreach ($this->response as $item) {
89 $userIdent = $item[
'account'];
90 $cmixUser = $this->cmixUsersByIdent[$userIdent];
92 'user_ident' => $userIdent,
96 'score' => $item[
'score'][
'scaled'],
97 'ilias_user_id' => $cmixUser->getUsrId()
101 foreach ($this->response as $item) {
102 $userIdent = str_replace(
'mailto:',
'', $item[
'mbox']);
103 $cmixUser = $this->cmixUsersByIdent[$userIdent];
105 'user_ident' => $userIdent,
109 'score' => $item[
'score'][
'scaled'],
110 'ilias_user_id' => $cmixUser->getUsrId()
114 usort(
$rows, fn (
$a,
$b):
int =>
$a[
'score'] !=
$b[
'score'] ?
$a[
'score'] >
$b[
'score'] ? -1 : 1 : 0);
121 if ($prevScore !== $item[
'score']) {
127 if (null === $this->userRank) {
129 $userIdent = str_replace(
'mailto:',
'',
$rows[
$key][
'user_ident']);
130 $cmixUser = $this->cmixUsersByIdent[$userIdent];
131 if ($cmixUser->getUsrId() == $DIC->user()->getId()) {
132 $this->userRank =
$key;
134 $rows[
$key][
'user'] = $userObj->getFullname();
143 $this->tableData = $retArr;
static getInstance(int $a_id=0, bool $a_reference=true)
static getInstance(int $a_id=0, bool $a_reference=true)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
formatRawTimestamp(string $rawTimestamp)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
fetchTotalDuration(array $allDurations)
static _lookupType(int $id, bool $reference=false)