5 require_once
'Modules/TestQuestionPool/exceptions/class.ilTestQuestionPoolException.php';
132 $this->index = (int)
$index;
154 $this->points = (float)
$points;
201 WHERE qht_hint_id = %s
204 $res = $ilDB->queryF(
205 $query, array(
'integer'), array((
int)
$id)
208 while(
$row = $ilDB->fetchAssoc(
$res) )
230 else return $this->
insert();
245 return $ilDB->update(
248 'qht_question_fi' => array(
'integer', $this->
getQuestionId()),
249 'qht_hint_index' => array(
'integer', $this->
getIndex()),
250 'qht_hint_points' => array(
'float', $this->
getPoints()),
251 'qht_hint_text' => array(
'clob', $this->
getText())
254 'qht_hint_id' => array(
'integer', $this->
getId())
271 $this->
setId($ilDB->nextId(
'qpl_hints'));
273 return $ilDB->insert(
'qpl_hints', array(
274 'qht_hint_id' => array(
'integer', $this->
getId()),
275 'qht_question_fi' => array(
'integer', $this->
getQuestionId()),
276 'qht_hint_index' => array(
'integer', $this->
getIndex()),
277 'qht_hint_points' => array(
'float', $this->
getPoints()),
278 'qht_hint_text' => array(
'clob', $this->
getText())
288 public function delete()
302 public static function assignDbRow(
self $questionHint, $hintDbRow)
304 foreach($hintDbRow as $field => $value)
308 case 'qht_hint_id': $questionHint->setId($value);
break;
309 case 'qht_question_fi': $questionHint->setQuestionId($value);
break;
310 case 'qht_hint_index': $questionHint->setIndex($value);
break;
311 case 'qht_hint_points': $questionHint->setPoints($value);
break;
312 case 'qht_hint_text': $questionHint->setText($value);
break;
334 DELETE FROM qpl_hints
335 WHERE qht_hint_id = %s
338 return $ilDB->manipulateF(
339 $query, array(
'integer'), array($hintId)
354 $questionHint =
new self();
355 $questionHint->load($hintId);
356 return $questionHint;