ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilTestEvaluation Class Reference
+ Collaboration diagram for ilTestEvaluation:

Public Member Functions

 __construct (ilDBInterface $db, $testId)
 ilTestEvaluation constructor. More...
 
 getAllActivesPasses ()
 

Protected Attributes

 $db
 
 $testId
 

Detailed Description

Definition at line 11 of file class.ilTestEvaluation.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestEvaluation::__construct ( ilDBInterface  $db,
  $testId 
)

ilTestEvaluation constructor.

Parameters
ilDBInterface$db
$testId

Definition at line 28 of file class.ilTestEvaluation.php.

References $db, and $testId.

29  {
30  $this->db = $db;
31  $this->testId = $testId;
32  }

Member Function Documentation

◆ getAllActivesPasses()

ilTestEvaluation::getAllActivesPasses ( )
Parameters
$testId
Returns
array

Definition at line 38 of file class.ilTestEvaluation.php.

References $query, $res, $row, and array.

Referenced by ilTestExportGUI\createTestArchiveExport().

39  {
40  $query = "
41  SELECT active_fi, pass
42  FROM tst_active actives
43  INNER JOIN tst_pass_result passes
44  ON active_fi = active_id
45  WHERE test_fi = %s
46  ";
47 
48  $res = $this->db->queryF($query, array('integer'), array($this->testId));
49 
50  $passes = array();
51 
52  while($row = $this->db->fetchAssoc($res))
53  {
54  if( !isset($passes[$row['active_fi']]) )
55  {
56  $passes[$row['active_fi']] = array();
57  }
58 
59  $passes[$row['active_fi']][] = $row['pass'];
60  }
61 
62  return $passes;
63  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

Field Documentation

◆ $db

ilTestEvaluation::$db
protected

Definition at line 16 of file class.ilTestEvaluation.php.

Referenced by __construct().

◆ $testId

ilTestEvaluation::$testId
protected

Definition at line 21 of file class.ilTestEvaluation.php.

Referenced by __construct().


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