ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ILIAS\Test\TestParticipantInfoService Class Reference
+ Collaboration diagram for ILIAS\Test\TestParticipantInfoService:

Public Member Functions

 __construct (\ilDBInterface $db)
 
 lookupTestIdByActiveId (int $active_id)
 

Private Attributes

ilDBInterface $database
 

Detailed Description

Definition at line 22 of file class.TestParticipantInfoService.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Test\TestParticipantInfoService::__construct ( \ilDBInterface  $db)

Definition at line 26 of file class.TestParticipantInfoService.php.

References ILIAS\$db.

27  {
28  $this->database = $db;
29  }

Member Function Documentation

◆ lookupTestIdByActiveId()

ILIAS\Test\TestParticipantInfoService::lookupTestIdByActiveId ( int  $active_id)

Definition at line 31 of file class.TestParticipantInfoService.php.

References ILIAS\Repository\int().

31  : int
32  {
33  $result = $this->database->queryF(
34  "SELECT test_fi FROM tst_active WHERE active_id = %s",
35  array('integer'),
36  array($active_id)
37  );
38  $test_id = -1;
39  if ($this->database->numRows($result) > 0) {
40  $row = $this->database->fetchAssoc($result);
41  $test_id = (int) $row["test_fi"];
42  }
43 
44  return $test_id;
45  }
+ Here is the call graph for this function:

Field Documentation

◆ $database

ilDBInterface ILIAS\Test\TestParticipantInfoService::$database
private

Definition at line 24 of file class.TestParticipantInfoService.php.


The documentation for this class was generated from the following file: