◆ __construct()
ilCmiXapiHighscoreReport::__construct |
( |
string |
$responseBody, |
|
|
|
$obj |
|
) |
| |
◆ fetchTotalDuration()
ilCmiXapiHighscoreReport::fetchTotalDuration |
( |
|
$allDurations | ) |
|
|
protected |
◆ formatRawTimestamp()
ilCmiXapiHighscoreReport::formatRawTimestamp |
( |
|
$rawTimestamp | ) |
|
|
private |
◆ getResponseDebug()
ilCmiXapiHighscoreReport::getResponseDebug |
( |
| ) |
|
◆ getTableData()
ilCmiXapiHighscoreReport::getTableData |
( |
| ) |
|
◆ getUserRank()
ilCmiXapiHighscoreReport::getUserRank |
( |
| ) |
|
◆ identUser()
ilCmiXapiHighscoreReport::identUser |
( |
|
$userIdent | ) |
|
|
private |
◆ initTableData()
ilCmiXapiHighscoreReport::initTableData |
( |
| ) |
|
- Returns
- bool
Definition at line 67 of file class.ilCmiXapiHighscoreReport.php.
References Vendor\Package\$a, Vendor\Package\$b, $DIC, $i, $rows, ilObjCmiXapi\CONT_TYPE_CMI5, fetchTotalDuration(), formatRawTimestamp(), ilObjCmiXapi\getContentType(), ilObjectFactory\getInstanceByObjId(), and ilObjCmiXapi\isMixedContentType().
74 foreach ($this->response as $item) {
75 $userIdent = str_replace(
'mailto:',
'', $item[
'mbox']);
76 if (empty($userIdent)) {
77 $userIdent = $item[
'account'];
79 $cmixUser = $this->cmixUsersByIdent[$userIdent];
81 'user_ident' => $userIdent,
85 'score' => $item[
'score'][
'scaled'],
86 'ilias_user_id' => $cmixUser->getUsrId()
90 foreach ($this->response as $item) {
91 $userIdent = $item[
'account'];
92 $cmixUser = $this->cmixUsersByIdent[$userIdent];
94 'user_ident' => $userIdent,
98 'score' => $item[
'score'][
'scaled'],
99 'ilias_user_id' => $cmixUser->getUsrId()
103 foreach ($this->response as $item) {
104 $userIdent = str_replace(
'mailto:',
'', $item[
'mbox']);
105 $cmixUser = $this->cmixUsersByIdent[$userIdent];
107 'user_ident' => $userIdent,
111 'score' => $item[
'score'][
'scaled'],
112 'ilias_user_id' => $cmixUser->getUsrId()
117 return $a[
'score'] !=
$b[
'score'] ?
$a[
'score'] >
$b[
'score'] ? -1 : 1 : 0;
124 foreach (
$rows as $key => $item) {
125 if ($prevScore !== $item[
'score']) {
129 $prevScore =
$rows[$key][
'score'];
131 if (null === $this->userRank) {
133 $userIdent = str_replace(
'mailto:',
'',
$rows[$key][
'user_ident']);
134 $cmixUser = $this->cmixUsersByIdent[$userIdent];
135 if ($cmixUser->getUsrId() == $DIC->user()->getId()) {
136 $this->userRank = $key;
138 $rows[$key][
'user'] = $userObj->getFullname();
140 $retArr[$key] = $rows[$key];
143 $rows[$key][
'user_ident'] =
false;
144 $retArr[$key] =
$rows[$key];
147 $this->tableData = $retArr;
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
formatRawTimestamp($rawTimestamp)
fetchTotalDuration($allDurations)
◆ $cmixUsersByIdent
ilCmiXapiHighscoreReport::$cmixUsersByIdent |
|
protected |
◆ $obj
ilCmiXapiHighscoreReport::$obj |
|
protected |
◆ $objId
ilCmiXapiHighscoreReport::$objId |
|
protected |
◆ $response
ilCmiXapiHighscoreReport::$response |
|
protected |
◆ $tableData
ilCmiXapiHighscoreReport::$tableData = [] |
|
private |
◆ $userRank
ilCmiXapiHighscoreReport::$userRank = null |
|
private |
The documentation for this class was generated from the following file: