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 462 of file class.ilTestTopList.php.
463 {
464 $retval = '';
465 $hours = intval(intval($seconds) / 3600);
466 $retval .= str_pad($hours, 2, "0", STR_PAD_LEFT) . ":";
467 $minutes = intval(($seconds / 60) % 60);
468 $retval .= str_pad($minutes, 2, "0", STR_PAD_LEFT) . ":";
469 $seconds = intval($seconds % 60);
470 $retval .= str_pad($seconds, 2, "0", STR_PAD_LEFT);
471 return $retval;
472 }
Referenced by getResultTableRow().
◆ getResultTableRow()
ilTestTopList::getResultTableRow |
( |
|
$row, |
|
|
|
$i, |
|
|
|
$a_user_id |
|
) |
| |
|
private |
- Parameters
-
array | $row | |
int | $i | |
int | $a_user_id | |
- Returns
- array
Definition at line 414 of file class.ilTestTopList.php.
415 {
416 $item = array();
417 $item['Rank'] = $i . '. ';
418
419 if($this->object->isHighscoreAnon() &&
$row[
'usr_id'] != $a_user_id)
420 {
421 $item['Participant'] = "-, -";
422 }
423 else
424 {
425 $item[
'Participant'] =
$row[
'lastname'] .
', ' .
$row[
'firstname'];
426 }
427
428 if($this->object->getHighscoreAchievedTS())
429 {
431
432 }
433
434 if($this->object->getHighscoreScore())
435 {
436 $item[
'Score'] =
$row[
'reached_points'] .
' / ' .
$row[
'max_points'];
437 }
438
439 if($this->object->getHighscorePercentage())
440 {
441 $item[
'Percentage'] =
$row[
'percentage'] .
'%';
442 }
443
444 if($this->object->getHighscoreHints())
445 {
446 $item[
'Hints'] =
$row[
'hint_count'];
447 }
448
449 if($this->object->getHighscoreWTime())
450 {
452 }
453
454 $item[
'Highlight'] = (
$row[
'usr_id'] == $a_user_id) ?
'tblrowmarked' :
'';
455 return $item;
456 }
@classDescription Date and time handling
References $row, formatTime(), and IL_CAL_UNIX.
◆ $object
The documentation for this class was generated from the following file: