5 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
30 public function __construct($a_container_id, $a_objective_id, $a_test_type)
32 $this->container_id = $a_container_id;
33 $this->objective_id = $a_objective_id;
34 $this->test_type = $a_test_type;
39 public static function lookupLimit($a_container_id, $a_objective_id, $a_test_type)
43 $query =
'SELECT * FROM loc_rnd_qpl '.
44 'WHERE container_id = '.$ilDB->quote($a_container_id,
'integer').
' '.
45 'AND objective_id = '.$ilDB->quote($a_objective_id,
'integer').
' '.
46 'AND tst_type = '.$ilDB->quote($a_test_type,
'integer');
50 return $row->percentage;
55 public static function lookupSequence($a_container_id, $a_objective_id, $a_test_id)
59 $query =
'SELECT * FROM loc_rnd_qpl '.
60 'WHERE container_id = '.$ilDB->quote($a_container_id,
'integer').
' '.
61 'AND objective_id = '.$ilDB->quote($a_objective_id,
'integer').
' '.
62 'AND tst_id = '.$ilDB->quote($a_test_id,
'integer');
75 $this->container_id = $a_id;
85 $this->objective_id = $a_id;
95 $this->test_type = $a_type;
105 $this->test_id = $a_id;
115 $this->qpl_seq = $a_id;
125 $this->limit = $a_id;
138 $query =
'SELECT * FROM loc_rnd_qpl '.
139 'WHERE container_id = '.$ilDB->quote($this->
getContainerId(),
'integer').
' '.
140 'AND objective_id = '.$ilDB->quote($this->
getObjectiveId(),
'integer').
' '.
141 'AND tst_type = '.$ilDB->quote($this->
getTestType(),
'integer');
153 public function delete()
157 $query =
'DELETE FROM loc_rnd_qpl '.
158 'WHERE container_id = '.$ilDB->quote($this->
getContainerId(),
'integer').
' '.
159 'AND objective_id = '.$ilDB->quote($this->
getObjectiveId(),
'integer').
' '.
160 'AND tst_type = '.$ilDB->quote($this->
getTestType(),
'integer');
161 $ilDB->manipulate(
$query);
168 $query =
'INSERT INTO loc_rnd_qpl ' .
169 '(container_id, objective_id, tst_type, tst_id, qp_seq, percentage) '.
174 $ilDB->quote($this->
getTestId(),
'integer').
', '.
176 $ilDB->quote($this->
getLimit()).
' '.
178 $ilDB->manipulate(
$query);