◆ __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().
75 foreach ($this->response as $item) {
76 $userIdent = str_replace(
'mailto:',
'', $item[
'mbox']);
77 if (empty($userIdent))
79 $userIdent = $item[
'account'];
81 $cmixUser = $this->cmixUsersByIdent[$userIdent];
83 'user_ident' => $userIdent,
87 'score' => $item[
'score'][
'scaled'],
88 'ilias_user_id' => $cmixUser->getUsrId()
94 foreach ($this->response as $item) {
95 $userIdent = $item[
'account'];
96 $cmixUser = $this->cmixUsersByIdent[$userIdent];
98 'user_ident' => $userIdent,
102 'score' => $item[
'score'][
'scaled'],
103 'ilias_user_id' => $cmixUser->getUsrId()
109 foreach ($this->response as $item) {
110 $userIdent = str_replace(
'mailto:',
'', $item[
'mbox']);
111 $cmixUser = $this->cmixUsersByIdent[$userIdent];
113 'user_ident' => $userIdent,
117 'score' => $item[
'score'][
'scaled'],
118 'ilias_user_id' => $cmixUser->getUsrId()
123 return $a[
'score'] !=
$b[
'score'] ?
$a[
'score'] >
$b[
'score'] ? -1 : 1 : 0;
130 foreach (
$rows as $key => $item) {
131 if ($prevScore !== $item[
'score']) {
135 $prevScore =
$rows[$key][
'score'];
137 if (null === $this->userRank) {
139 $userIdent = str_replace(
'mailto:',
'',
$rows[$key][
'user_ident']);
140 $cmixUser = $this->cmixUsersByIdent[$userIdent];
141 if ($cmixUser->getUsrId() == $DIC->user()->getId()) {
142 $this->userRank = $key;
144 $rows[$key][
'user'] = $userObj->getFullname();
146 $retArr[$key] = $rows[$key];
149 $rows[$key][
'user_ident'] =
false;
150 $retArr[$key] =
$rows[$key];
153 $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: