4 require_once
'Modules/Test/classes/class.ilTestSession.php';
5 require_once
'Modules/Test/classes/class.ilTestDynamicQuestionSetFilterSelection.php';
7 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
42 $result = $ilDB->queryF(
"SELECT * FROM tst_active WHERE active_id = %s",
49 $this->active_id =
$row[
"active_id"];
50 $this->user_id =
$row[
"user_fi"];
51 $this->anonymous_id =
$row[
"anonymous_id"];
52 $this->test_id =
$row[
"test_fi"];
53 $this->lastsequence =
$row[
"lastindex"];
54 $this->pass =
$row[
"tries"];
55 $this->submitted = (
$row[
"submitted"]) ? TRUE : FALSE;
56 $this->submittedTimestamp =
$row[
"submittimestamp"];
57 $this->tstamp =
$row[
"tstamp"];
59 $this->questionSetFilterSelection->setTaxonomySelection(unserialize(
$row[
'taxfilter']));
60 $this->questionSetFilterSelection->setAnswerStatusSelection(
$row[
'answerstatusfilter']);
61 $this->questionSetFilterSelection->setAnswerStatusActiveId(
$row[
'active_id']);
76 $result = $ilDB->queryF(
"SELECT * FROM tst_active WHERE user_fi = %s AND test_fi = %s AND anonymous_id = %s",
77 array(
'integer',
'integer',
'text'),
83 $result = $ilDB->queryF(
"SELECT * FROM tst_active WHERE user_fi = %s AND test_fi = %s AND anonymous_id = %s",
84 array(
'integer',
'integer',
'text'),
90 if (
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID)
94 $result = $ilDB->queryF(
"SELECT * FROM tst_active WHERE user_fi = %s AND test_fi = %s",
95 array(
'integer',
'integer'),
102 $this->active_id =
$row[
"active_id"];
103 $this->user_id =
$row[
"user_fi"];
104 $this->anonymous_id =
$row[
"anonymous_id"];
105 $this->test_id =
$row[
"test_fi"];
106 $this->lastsequence =
$row[
"lastindex"];
107 $this->pass =
$row[
"tries"];
108 $this->submitted = (
$row[
"submitted"]) ? TRUE : FALSE;
109 $this->submittedTimestamp =
$row[
"submittimestamp"];
110 $this->tstamp =
$row[
"tstamp"];
112 $this->questionSetFilterSelection->setTaxonomySelection(unserialize(
$row[
'taxfilter']));
113 $this->questionSetFilterSelection->setAnswerStatusSelection(
$row[
'answerstatusfilter']);
114 $this->questionSetFilterSelection->setAnswerStatusActiveId(
$row[
'active_id']);
127 if ($this->active_id > 0)
129 $affectedRows = $ilDB->update(
'tst_active',
132 'tries' => array(
'integer', $this->
getPass()),
135 'tstamp' => array(
'integer', time()-10),
140 'active_id' => array(
'integer', $this->
getActiveId())
145 include_once(
"./Modules/Test/classes/class.ilObjTestAccess.php");
146 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
156 $next_id = $ilDB->nextId(
'tst_active');
157 $affectedRows = $ilDB->insert(
'tst_active',
159 'active_id' => array(
'integer', $next_id),
160 'user_fi' => array(
'integer', $this->
getUserId()),
162 'test_fi' => array(
'integer', $this->
getTestId()),
164 'tries' => array(
'integer', $this->
getPass()),
167 'tstamp' => array(
'integer', time()-10),
172 $this->active_id = $next_id;
175 include_once(
"./Modules/Test/classes/class.ilObjTestAccess.php");
176 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
182 include_once(
"./Services/Tracking/classes/class.ilLearningProgress.php");