53 $result =
$ilDB->queryF(
54 "SELECT * FROM tst_active WHERE active_id = %s",
58 if ($result->numRows()) {
59 $row =
$ilDB->fetchAssoc($result);
60 $this->active_id = $row[
"active_id"];
61 $this->user_id = $row[
"user_fi"];
62 $this->anonymous_id = $row[
"anonymous_id"];
63 $this->test_id = $row[
"test_fi"];
64 $this->lastsequence = $row[
"lastindex"];
65 $this->submitted = ($row[
"submitted"]) ?
true :
false;
66 $this->submittedTimestamp = $row[
"submittimestamp"];
67 $this->tstamp = $row[
"tstamp"];
69 $this->questionSetFilterSelection->setTaxonomySelection(unserialize($row[
'taxfilter']));
70 $this->questionSetFilterSelection->setAnswerStatusSelection($row[
'answerstatusfilter']);
71 $this->questionSetFilterSelection->setAnswerStatusActiveId($row[
'active_id']);
85 $result =
$ilDB->queryF(
86 "SELECT * FROM tst_active WHERE user_fi = %s AND test_fi = %s AND anonymous_id = %s",
87 array(
'integer',
'integer',
'text'),
91 $result =
$ilDB->queryF(
92 "SELECT * FROM tst_active WHERE user_fi = %s AND test_fi = %s AND anonymous_id = %s",
93 array(
'integer',
'integer',
'text'),
100 $result =
$ilDB->queryF(
101 "SELECT * FROM tst_active WHERE user_fi = %s AND test_fi = %s",
102 array(
'integer',
'integer'),
110 if ($result->numRows()) {
111 $row =
$ilDB->fetchAssoc($result);
112 $this->active_id = $row[
"active_id"];
113 $this->user_id = $row[
"user_fi"];
114 $this->anonymous_id = $row[
"anonymous_id"];
115 $this->test_id = $row[
"test_fi"];
116 $this->lastsequence = $row[
"lastindex"];
117 $this->submitted = ($row[
"submitted"]) ?
true :
false;
118 $this->submittedTimestamp = $row[
"submittimestamp"];
119 $this->tstamp = $row[
"tstamp"];
121 $this->questionSetFilterSelection->setTaxonomySelection(unserialize($row[
'taxfilter']));
122 $this->questionSetFilterSelection->setAnswerStatusSelection($row[
'answerstatusfilter']);
123 $this->questionSetFilterSelection->setAnswerStatusActiveId($row[
'active_id']);
132 $ilDB = $DIC[
'ilDB'];
133 $ilLog = $DIC[
'ilLog'];
136 if ($this->active_id > 0) {
137 $affectedRows =
$ilDB->update(
141 'tries' => array(
'integer', $this->
getPass()),
144 'tstamp' => array(
'integer', time() - 10),
149 'active_id' => array(
'integer', $this->
getActiveId())
154 include_once(
"./Modules/Test/classes/class.ilObjTestAccess.php");
155 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
164 $next_id =
$ilDB->nextId(
'tst_active');
165 $affectedRows =
$ilDB->insert(
168 'active_id' => array(
'integer', $next_id),
169 'user_fi' => array(
'integer', $this->
getUserId()),
171 'test_fi' => array(
'integer', $this->
getTestId()),
173 'tries' => array(
'integer', $this->
getPass()),
176 'tstamp' => array(
'integer', time() - 10),
181 $this->active_id = $next_id;
184 include_once(
"./Modules/Test/classes/class.ilObjTestAccess.php");
185 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
193 include_once(
"./Services/Tracking/classes/class.ilLearningProgress.php");
static _getParticipantId($active_id)
Get user id for active id.
getAccessCodeFromSession()
$questionSetFilterSelection
doesAccessCodeInSessionExists()
static _tracProgress(int $a_user_id, int $a_obj_id, int $a_ref_id, string $a_obj_type='')
loadTestSession($test_id, $user_id="", $anonymous_id="")
static _lookupObjIdForTestId($a_test_id)
Lookup object id for test id.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
unsetAccessCodeInSession()
getQuestionSetFilterSelection()
setCurrentQuestionId($currentQuestionId)
__construct(Container $dic, ilPlugin $plugin)
setLastSequence($lastsequence)
activeIDExists($user_id, $test_id)
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)