ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestRandomQuestionSetSourcePoolDefinition Class Reference
+ Collaboration diagram for ilTestRandomQuestionSetSourcePoolDefinition:

Public Member Functions

 __construct (ilDB $db, ilObjTest $testOBJ)
 setId ($id)
 getId ()
 setPoolId ($poolId)
 getPoolId ()
 setPoolTitle ($poolTitle)
 getPoolTitle ()
 setPoolPath ($poolPath)
 getPoolPath ()
 setPoolQuestionCount ($poolQuestionCount)
 getPoolQuestionCount ()
 setOriginalFilterTaxId ($originalFilterTaxId)
 getOriginalFilterTaxId ()
 setOriginalFilterTaxNodeId ($originalFilterNodeId)
 getOriginalFilterTaxNodeId ()
 setMappedFilterTaxId ($mappedFilterTaxId)
 getMappedFilterTaxId ()
 setMappedFilterTaxNodeId ($mappedFilterTaxNodeId)
 getMappedFilterTaxNodeId ()
 setQuestionAmount ($questionAmount)
 getQuestionAmount ()
 setSequencePosition ($sequencePosition)
 getSequencePosition ()
 initFromArray ($dataArray)
 loadFromDb ($id)
 saveToDb ()
 cloneToDbForTestId ($testId)
 deleteFromDb ()
 getPoolInfoLabel (ilLanguage $lng)

Protected Attributes

 $db = null
 $testOBJ = null

Private Member Functions

 updateDbRecord ($testId)
 insertDbRecord ($testId)

Private Attributes

 $id = null
 $poolId = null
 $poolTitle = null
 $poolPath = null
 $poolQuestionCount = null
 $originalFilterTaxId = null
 $originalFilterTaxNodeId = null
 $mappedFilterTaxId = null
 $mappedFilterTaxNodeId = null
 $questionAmount = null
 $sequencePosition = null

Detailed Description

Constructor & Destructor Documentation

ilTestRandomQuestionSetSourcePoolDefinition::__construct ( ilDB  $db,
ilObjTest  $testOBJ 
)

Definition at line 48 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $db, and $testOBJ.

{
$this->db = $db;
$this->testOBJ = $testOBJ;
}

Member Function Documentation

ilTestRandomQuestionSetSourcePoolDefinition::cloneToDbForTestId (   $testId)

Definition at line 222 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References insertDbRecord().

{
$this->insertDbRecord($testId);
}

+ Here is the call graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::deleteFromDb ( )

Definition at line 227 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References getId().

{
$this->db->manipulateF(
"DELETE FROM tst_rnd_quest_set_qpls WHERE def_id = %s", array('integer'), array($this->getId())
);
}

+ Here is the call graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::getMappedFilterTaxId ( )
ilTestRandomQuestionSetSourcePoolDefinition::getMappedFilterTaxNodeId ( )
ilTestRandomQuestionSetSourcePoolDefinition::getOriginalFilterTaxId ( )

Definition at line 109 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $originalFilterTaxId.

Referenced by ilTestRandomQuestionSetPoolDefinitionFormGUI\build(), insertDbRecord(), and updateDbRecord().

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::getOriginalFilterTaxNodeId ( )
ilTestRandomQuestionSetSourcePoolDefinition::getPoolId ( )
ilTestRandomQuestionSetSourcePoolDefinition::getPoolInfoLabel ( ilLanguage  $lng)

Definition at line 286 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References getPoolPath(), getPoolQuestionCount(), getPoolTitle(), and ilLanguage\txt().

Referenced by ilTestRandomQuestionSetPoolDefinitionFormGUI\build().

{
$poolInfoLabel = sprintf(
$lng->txt('tst_dynamic_question_set_source_questionpool_summary_string'),
$this->getPoolTitle(),
$this->getPoolPath(),
);
return $poolInfoLabel;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::getPoolPath ( )

Definition at line 89 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $poolPath.

Referenced by getPoolInfoLabel(), insertDbRecord(), and updateDbRecord().

{
}

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::getPoolQuestionCount ( )

Definition at line 99 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $poolQuestionCount.

Referenced by getPoolInfoLabel(), insertDbRecord(), and updateDbRecord().

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::getPoolTitle ( )

Definition at line 79 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $poolTitle.

Referenced by ilLOUtils\buildQplTitleByDefinition(), getPoolInfoLabel(), insertDbRecord(), and updateDbRecord().

{
}

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::getQuestionAmount ( )

Definition at line 149 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $questionAmount.

Referenced by ilTestRandomQuestionSetPoolDefinitionFormGUI\build(), insertDbRecord(), and updateDbRecord().

{
}

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::getSequencePosition ( )

Definition at line 159 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $sequencePosition.

Referenced by insertDbRecord(), and updateDbRecord().

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::initFromArray (   $dataArray)
Parameters
array$dataArray

Definition at line 169 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References setId(), setMappedFilterTaxId(), setMappedFilterTaxNodeId(), setOriginalFilterTaxId(), setOriginalFilterTaxNodeId(), setPoolId(), setPoolPath(), setPoolQuestionCount(), setPoolTitle(), setQuestionAmount(), and setSequencePosition().

Referenced by loadFromDb().

{
foreach($dataArray as $field => $value)
{
switch($field)
{
case 'def_id': $this->setId($value); break;
case 'pool_fi': $this->setPoolId($value); break;
case 'pool_title': $this->setPoolTitle($value); break;
case 'pool_path': $this->setPoolPath($value); break;
case 'pool_quest_count': $this->setPoolQuestionCount($value); break;
case 'origin_tax_fi': $this->setOriginalFilterTaxId($value); break;
case 'origin_node_fi': $this->setOriginalFilterTaxNodeId($value); break;
case 'mapped_tax_fi': $this->setMappedFilterTaxId($value); break;
case 'mapped_node_fi': $this->setMappedFilterTaxNodeId($value); break;
case 'quest_amount': $this->setQuestionAmount($value); break;
case 'sequence_pos': $this->setSequencePosition($value); break;
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::insertDbRecord (   $testId)
private
Parameters
$testId

Definition at line 262 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References getMappedFilterTaxId(), getMappedFilterTaxNodeId(), getOriginalFilterTaxId(), getOriginalFilterTaxNodeId(), getPoolId(), getPoolPath(), getPoolQuestionCount(), getPoolTitle(), getQuestionAmount(), getSequencePosition(), and setId().

Referenced by cloneToDbForTestId(), and saveToDb().

{
$nextId = $this->db->nextId('tst_rnd_quest_set_qpls');
$this->db->insert('tst_rnd_quest_set_qpls', array(
'def_id' => array('integer', $nextId),
'test_fi' => array('integer', $testId),
'pool_fi' => array('integer', $this->getPoolId()),
'pool_title' => array('text', $this->getPoolTitle()),
'pool_path' => array('text', $this->getPoolPath()),
'pool_quest_count' => array('integer', $this->getPoolQuestionCount()),
'origin_tax_fi' => array('integer', $this->getOriginalFilterTaxId()),
'origin_node_fi' => array('integer', $this->getOriginalFilterTaxNodeId()),
'mapped_tax_fi' => array('integer', $this->getMappedFilterTaxId()),
'mapped_node_fi' => array('integer', $this->getMappedFilterTaxNodeId()),
'quest_amount' => array('integer', $this->getQuestionAmount()),
'sequence_pos' => array('integer', $this->getSequencePosition())
));
$this->setId($nextId);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::loadFromDb (   $id)
Parameters
integer$poolId
Returns
boolean

Definition at line 194 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $id, $res, $row, and initFromArray().

{
$res = $this->db->queryF(
"SELECT * FROM tst_rnd_quest_set_qpls WHERE def_id = %s", array('integer'), array($id)
);
while( $row = $this->db->fetchAssoc($res) )
{
return true;
}
return false;
}

+ Here is the call graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::saveToDb ( )

Definition at line 210 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References getId(), insertDbRecord(), and updateDbRecord().

{
if( $this->getId() )
{
$this->updateDbRecord($this->testOBJ->getTestId());
}
else
{
$this->insertDbRecord($this->testOBJ->getTestId());
}
}

+ Here is the call graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::setId (   $id)

Definition at line 54 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $id.

Referenced by initFromArray(), and insertDbRecord().

{
$this->id = $id;
}

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::setMappedFilterTaxId (   $mappedFilterTaxId)

Definition at line 124 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $mappedFilterTaxId.

Referenced by initFromArray().

{
$this->mappedFilterTaxId = $mappedFilterTaxId;
}

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::setMappedFilterTaxNodeId (   $mappedFilterTaxNodeId)

Definition at line 134 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $mappedFilterTaxNodeId.

Referenced by initFromArray().

{
$this->mappedFilterTaxNodeId = $mappedFilterTaxNodeId;
}

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::setOriginalFilterTaxId (   $originalFilterTaxId)

Definition at line 104 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $originalFilterTaxId.

Referenced by ilTestRandomQuestionSetPoolDefinitionFormGUI\applySubmit(), and initFromArray().

{
$this->originalFilterTaxId = $originalFilterTaxId;
}

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::setOriginalFilterTaxNodeId (   $originalFilterNodeId)

Definition at line 114 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

Referenced by ilTestRandomQuestionSetPoolDefinitionFormGUI\applySubmit(), and initFromArray().

{
$this->originalFilterTaxNodeId = $originalFilterNodeId;
}

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::setPoolId (   $poolId)

Definition at line 64 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $poolId.

Referenced by initFromArray().

{
$this->poolId = $poolId;
}

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::setPoolPath (   $poolPath)

Definition at line 84 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $poolPath.

Referenced by initFromArray().

{
$this->poolPath = $poolPath;
}

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::setPoolQuestionCount (   $poolQuestionCount)

Definition at line 94 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $poolQuestionCount.

Referenced by initFromArray().

{
$this->poolQuestionCount = $poolQuestionCount;
}

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::setPoolTitle (   $poolTitle)

Definition at line 74 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $poolTitle.

Referenced by initFromArray().

{
$this->poolTitle = $poolTitle;
}

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::setQuestionAmount (   $questionAmount)

Definition at line 144 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $questionAmount.

Referenced by ilTestRandomQuestionSetPoolDefinitionFormGUI\applySubmit(), and initFromArray().

{
$this->questionAmount = $questionAmount;
}

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::setSequencePosition (   $sequencePosition)

Definition at line 154 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References $sequencePosition.

Referenced by initFromArray().

{
$this->sequencePosition = $sequencePosition;
}

+ Here is the caller graph for this function:

ilTestRandomQuestionSetSourcePoolDefinition::updateDbRecord (   $testId)
private
Parameters
$testId

Definition at line 237 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

References getId(), getMappedFilterTaxId(), getMappedFilterTaxNodeId(), getOriginalFilterTaxId(), getOriginalFilterTaxNodeId(), getPoolId(), getPoolPath(), getPoolQuestionCount(), getPoolTitle(), getQuestionAmount(), and getSequencePosition().

Referenced by saveToDb().

{
$this->db->update('tst_rnd_quest_set_qpls',
array(
'test_fi' => array('integer', $testId),
'pool_fi' => array('integer', $this->getPoolId()),
'pool_title' => array('text', $this->getPoolTitle()),
'pool_path' => array('text', $this->getPoolPath()),
'pool_quest_count' => array('integer', $this->getPoolQuestionCount()),
'origin_tax_fi' => array('integer', $this->getOriginalFilterTaxId()),
'origin_node_fi' => array('integer', $this->getOriginalFilterTaxNodeId()),
'mapped_tax_fi' => array('integer', $this->getMappedFilterTaxId()),
'mapped_node_fi' => array('integer', $this->getMappedFilterTaxNodeId()),
'quest_amount' => array('integer', $this->getQuestionAmount()),
'sequence_pos' => array('integer', $this->getSequencePosition())
),
array(
'def_id' => array('integer', $this->getId())
)
);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilTestRandomQuestionSetSourcePoolDefinition::$db = null
protected

Definition at line 17 of file class.ilTestRandomQuestionSetSourcePoolDefinition.php.

Referenced by __construct().

ilTestRandomQuestionSetSourcePoolDefinition::$id = null
private

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

Referenced by getId(), loadFromDb(), and setId().

ilTestRandomQuestionSetSourcePoolDefinition::$mappedFilterTaxId = null
private
ilTestRandomQuestionSetSourcePoolDefinition::$mappedFilterTaxNodeId = null
private
ilTestRandomQuestionSetSourcePoolDefinition::$originalFilterTaxId = null
private
ilTestRandomQuestionSetSourcePoolDefinition::$originalFilterTaxNodeId = null
private
ilTestRandomQuestionSetSourcePoolDefinition::$poolId = null
private

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

Referenced by getPoolId(), and setPoolId().

ilTestRandomQuestionSetSourcePoolDefinition::$poolPath = null
private
ilTestRandomQuestionSetSourcePoolDefinition::$poolQuestionCount = null
private
ilTestRandomQuestionSetSourcePoolDefinition::$poolTitle = null
private
ilTestRandomQuestionSetSourcePoolDefinition::$questionAmount = null
private
ilTestRandomQuestionSetSourcePoolDefinition::$sequencePosition = null
private
ilTestRandomQuestionSetSourcePoolDefinition::$testOBJ = null
protected

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

Referenced by __construct().


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