19 declare(strict_types=1);
33 $this->questions = [];
35 $result = $this->db->queryF(
36 "SELECT tst_test_rnd_qst.* FROM tst_test_rnd_qst, qpl_questions WHERE tst_test_rnd_qst.active_fi = %s AND qpl_questions.question_id = tst_test_rnd_qst.question_fi AND tst_test_rnd_qst.pass = %s ORDER BY sequence",
37 [
'integer',
'integer'],
38 [$this->active_id, $this->pass]
44 if ($result->numRows() == 0) {
45 $result = $this->db->queryF(
46 "SELECT tst_test_rnd_qst.* FROM tst_test_rnd_qst, qpl_questions WHERE tst_test_rnd_qst.active_fi = %s AND qpl_questions.question_id = tst_test_rnd_qst.question_fi AND tst_test_rnd_qst.pass = 0 ORDER BY sequence",
54 while (
$data = $this->db->fetchAssoc($result)) {
55 $this->questions[$index++] =
$data[
"question_fi"];
57 $this->responsibleSourcePoolDefinitionByQuestion[
$data[
'question_fi']] = $data[
'src_pool_def_fi'];
73 $result = $this->db->queryF(
74 "SELECT test_random_question_id FROM tst_test_rnd_qst WHERE active_fi = %s AND pass = %s",
75 [
'integer',
'integer'],
78 return ($result->numRows() > 0) ?
true :
false;
83 if (isset($this->responsibleSourcePoolDefinitionByQuestion[$question_id])) {
84 return $this->responsibleSourcePoolDefinitionByQuestion[$question_id];
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$responsibleSourcePoolDefinitionByQuestion
getResponsibleSourcePoolDefinitionId(int $question_id)
hasRandomQuestionsForPass(int $active_id, int $pass)
!!! LEGACY CODE !!!