Class ilTestTopList.
More...
Class ilTestTopList.
Definition at line 7 of file class.ilTestTopList.php.
◆ __construct()
ilTestTopList::__construct |
( |
ilObjTest |
$a_object | ) |
|
◆ formatTime()
ilTestTopList::formatTime |
( |
|
$seconds | ) |
|
|
private |
- Parameters
-
- Returns
- string
Definition at line 448 of file class.ilTestTopList.php.
Referenced by getResultTableRow().
451 $hours = intval(intval($seconds) / 3600);
452 $retval .= str_pad($hours, 2,
"0", STR_PAD_LEFT) .
":";
453 $minutes = intval(($seconds / 60) % 60);
454 $retval .= str_pad($minutes, 2,
"0", STR_PAD_LEFT) .
":";
455 $seconds = intval($seconds % 60);
456 $retval .= str_pad($seconds, 2,
"0", STR_PAD_LEFT);
◆ getResultTableRow()
ilTestTopList::getResultTableRow |
( |
|
$row, |
|
|
|
$i, |
|
|
|
$a_user_id |
|
) |
| |
|
private |
- Parameters
-
array | $row | |
int | $i | |
int | $a_user_id | |
- Returns
- array
Definition at line 409 of file class.ilTestTopList.php.
References $i, $row, formatTime(), and IL_CAL_UNIX.
Referenced by __construct().
412 $item[
'Rank'] =
$i .
'. ';
414 if ($this->object->isHighscoreAnon() &&
$row[
'usr_id'] != $a_user_id) {
415 $item[
'Participant'] =
"-, -";
417 $item[
'Participant'] =
$row[
'lastname'] .
', ' .
$row[
'firstname'];
420 if ($this->object->getHighscoreAchievedTS()) {
424 if ($this->object->getHighscoreScore()) {
425 $item[
'Score'] =
$row[
'reached_points'] .
' / ' .
$row[
'max_points'];
428 if ($this->object->getHighscorePercentage()) {
429 $item[
'Percentage'] =
$row[
'percentage'] .
'%';
432 if ($this->object->getHighscoreHints()) {
433 $item[
'Hints'] =
$row[
'hint_count'];
436 if ($this->object->getHighscoreWTime()) {
440 $item[
'Highlight'] = (
$row[
'usr_id'] == $a_user_id) ?
'tblrowmarked' :
'';
◆ $object
The documentation for this class was generated from the following file: