ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLORandomTestQuestionPools Class Reference

Class ilLOEditorGUI. More...

+ Collaboration diagram for ilLORandomTestQuestionPools:

Public Member Functions

 __construct ($a_container_id, $a_objective_id, $a_test_type)
 Constructor.
 setContainerId ($a_id)
 getContainerId ()
 setObjectiveId ($a_id)
 getObjectiveId ()
 setTestType ($a_type)
 getTestType ()
 setTestId ($a_id)
 getTestId ()
 setQplSequence ($a_id)
 getQplSequence ()
 setLimit ($a_id)
 getLimit ()
 read ()
 delete ()
 create ()

Static Public Member Functions

static lookupLimit ($a_container_id, $a_objective_id, $a_test_type)
static lookupSequence ($a_container_id, $a_objective_id, $a_test_id)

Protected Attributes

 $container_id = 0
 $objective_id = 0
 $test_type = 0
 $test_id = 0
 $qpl_seq = 0
 $limit = 50

Detailed Description

Constructor & Destructor Documentation

ilLORandomTestQuestionPools::__construct (   $a_container_id,
  $a_objective_id,
  $a_test_type 
)

Constructor.

Parameters
type$a_container_id
type$a_objective_id

Definition at line 30 of file class.ilLORandomTestQuestionPools.php.

References read().

{
$this->container_id = $a_container_id;
$this->objective_id = $a_objective_id;
$this->test_type = $a_test_type;
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

ilLORandomTestQuestionPools::create ( )

Definition at line 164 of file class.ilLORandomTestQuestionPools.php.

References $ilDB, $query, getContainerId(), getLimit(), getObjectiveId(), getQplSequence(), getTestId(), and getTestType().

{
global $ilDB;
$query = 'INSERT INTO loc_rnd_qpl ' .
'(container_id, objective_id, tst_type, tst_id, qp_seq, percentage) '.
'VALUES ( '.
$ilDB->quote($this->getContainerId(),'integer').', '.
$ilDB->quote($this->getObjectiveId(),'integer').', '.
$ilDB->quote($this->getTestType(),'integer').', '.
$ilDB->quote($this->getTestId(),'integer').', '.
$ilDB->quote($this->getQplSequence(),'integer').', '.
$ilDB->quote($this->getLimit()).' '.
')';
$ilDB->manipulate($query);
}

+ Here is the call graph for this function:

ilLORandomTestQuestionPools::delete ( )

Definition at line 153 of file class.ilLORandomTestQuestionPools.php.

References $ilDB, $query, getContainerId(), getObjectiveId(), and getTestType().

{
global $ilDB;
$query = 'DELETE FROM loc_rnd_qpl '.
'WHERE container_id = '.$ilDB->quote($this->getContainerId(),'integer').' '.
'AND objective_id = '.$ilDB->quote($this->getObjectiveId(),'integer').' '.
'AND tst_type = '.$ilDB->quote($this->getTestType(),'integer');
$ilDB->manipulate($query);
}

+ Here is the call graph for this function:

ilLORandomTestQuestionPools::getContainerId ( )

Definition at line 78 of file class.ilLORandomTestQuestionPools.php.

References $container_id.

Referenced by create(), delete(), and read().

{
}

+ Here is the caller graph for this function:

ilLORandomTestQuestionPools::getLimit ( )

Definition at line 128 of file class.ilLORandomTestQuestionPools.php.

References $limit.

Referenced by create().

{
return $this->limit;
}

+ Here is the caller graph for this function:

ilLORandomTestQuestionPools::getObjectiveId ( )

Definition at line 88 of file class.ilLORandomTestQuestionPools.php.

References $objective_id.

Referenced by create(), delete(), and read().

{
}

+ Here is the caller graph for this function:

ilLORandomTestQuestionPools::getQplSequence ( )

Definition at line 118 of file class.ilLORandomTestQuestionPools.php.

References $qpl_seq.

Referenced by create().

{
}

+ Here is the caller graph for this function:

ilLORandomTestQuestionPools::getTestId ( )

Definition at line 108 of file class.ilLORandomTestQuestionPools.php.

References $test_id.

Referenced by create().

{
}

+ Here is the caller graph for this function:

ilLORandomTestQuestionPools::getTestType ( )

Definition at line 98 of file class.ilLORandomTestQuestionPools.php.

References $test_type.

Referenced by create(), delete(), and read().

{
}

+ Here is the caller graph for this function:

static ilLORandomTestQuestionPools::lookupLimit (   $a_container_id,
  $a_objective_id,
  $a_test_type 
)
static

Definition at line 39 of file class.ilLORandomTestQuestionPools.php.

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilLOUtils\lookupObjectiveRequiredPercentage().

{
global $ilDB;
$query = 'SELECT * FROM loc_rnd_qpl '.
'WHERE container_id = '.$ilDB->quote($a_container_id,'integer').' '.
'AND objective_id = '.$ilDB->quote($a_objective_id,'integer').' '.
'AND tst_type = '.$ilDB->quote($a_test_type,'integer');
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return $row->percentage;
}
return 0;
}

+ Here is the caller graph for this function:

static ilLORandomTestQuestionPools::lookupSequence (   $a_container_id,
  $a_objective_id,
  $a_test_id 
)
static

Definition at line 55 of file class.ilLORandomTestQuestionPools.php.

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilLOEditorStatus\lookupQuestionsAssigned().

{
global $ilDB;
$query = 'SELECT * FROM loc_rnd_qpl '.
'WHERE container_id = '.$ilDB->quote($a_container_id,'integer').' '.
'AND objective_id = '.$ilDB->quote($a_objective_id,'integer').' '.
'AND tst_id = '.$ilDB->quote($a_test_id,'integer');
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return $row->qp_seq;
}
return 0;
}

+ Here is the caller graph for this function:

ilLORandomTestQuestionPools::read ( )

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

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, getContainerId(), getObjectiveId(), getTestType(), setLimit(), setQplSequence(), and setTestId().

Referenced by __construct().

{
global $ilDB;
$query = 'SELECT * FROM loc_rnd_qpl '.
'WHERE container_id = '.$ilDB->quote($this->getContainerId(),'integer').' '.
'AND objective_id = '.$ilDB->quote($this->getObjectiveId(),'integer').' '.
'AND tst_type = '.$ilDB->quote($this->getTestType(),'integer');
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->setLimit($row->percentage);
$this->setTestId($row->tst_id);
$this->setQplSequence($row->qp_seq);
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLORandomTestQuestionPools::setContainerId (   $a_id)

Definition at line 73 of file class.ilLORandomTestQuestionPools.php.

{
$this->container_id = $a_id;
}
ilLORandomTestQuestionPools::setLimit (   $a_id)

Definition at line 123 of file class.ilLORandomTestQuestionPools.php.

Referenced by read().

{
$this->limit = $a_id;
}

+ Here is the caller graph for this function:

ilLORandomTestQuestionPools::setObjectiveId (   $a_id)

Definition at line 83 of file class.ilLORandomTestQuestionPools.php.

{
$this->objective_id = $a_id;
}
ilLORandomTestQuestionPools::setQplSequence (   $a_id)

Definition at line 113 of file class.ilLORandomTestQuestionPools.php.

Referenced by read().

{
$this->qpl_seq = $a_id;
}

+ Here is the caller graph for this function:

ilLORandomTestQuestionPools::setTestId (   $a_id)

Definition at line 103 of file class.ilLORandomTestQuestionPools.php.

Referenced by read().

{
$this->test_id = $a_id;
}

+ Here is the caller graph for this function:

ilLORandomTestQuestionPools::setTestType (   $a_type)

Definition at line 93 of file class.ilLORandomTestQuestionPools.php.

{
$this->test_type = $a_type;
}

Field Documentation

ilLORandomTestQuestionPools::$container_id = 0
protected

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

Referenced by getContainerId().

ilLORandomTestQuestionPools::$limit = 50
protected

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

Referenced by getLimit().

ilLORandomTestQuestionPools::$objective_id = 0
protected

Definition at line 18 of file class.ilLORandomTestQuestionPools.php.

Referenced by getObjectiveId().

ilLORandomTestQuestionPools::$qpl_seq = 0
protected

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

Referenced by getQplSequence().

ilLORandomTestQuestionPools::$test_id = 0
protected

Definition at line 20 of file class.ilLORandomTestQuestionPools.php.

Referenced by getTestId().

ilLORandomTestQuestionPools::$test_type = 0
protected

Definition at line 19 of file class.ilLORandomTestQuestionPools.php.

Referenced by getTestType().


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