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';
26 parent::__construct();
44 "SELECT * FROM tst_active WHERE active_id = %s",
50 $this->active_id =
$row[
"active_id"];
51 $this->user_id =
$row[
"user_fi"];
52 $this->anonymous_id =
$row[
"anonymous_id"];
53 $this->test_id =
$row[
"test_fi"];
54 $this->lastsequence =
$row[
"lastindex"];
55 $this->pass =
$row[
"tries"];
56 $this->submitted = (
$row[
"submitted"]) ?
true :
false;
57 $this->submittedTimestamp =
$row[
"submittimestamp"];
58 $this->tstamp =
$row[
"tstamp"];
60 $this->questionSetFilterSelection->setTaxonomySelection(unserialize(
$row[
'taxfilter']));
61 $this->questionSetFilterSelection->setAnswerStatusSelection(
$row[
'answerstatusfilter']);
62 $this->questionSetFilterSelection->setAnswerStatusActiveId(
$row[
'active_id']);
77 "SELECT * FROM tst_active WHERE user_fi = %s AND test_fi = %s AND anonymous_id = %s",
78 array(
'integer',
'integer',
'text'),
83 "SELECT * FROM tst_active WHERE user_fi = %s AND test_fi = %s AND anonymous_id = %s",
84 array(
'integer',
'integer',
'text'),
88 if (
$GLOBALS[
'DIC'][
'ilUser']->getId() == ANONYMOUS_USER_ID) {
92 "SELECT * FROM tst_active WHERE user_fi = %s AND test_fi = %s",
93 array(
'integer',
'integer'),
103 $this->active_id =
$row[
"active_id"];
104 $this->user_id =
$row[
"user_fi"];
105 $this->anonymous_id =
$row[
"anonymous_id"];
106 $this->test_id =
$row[
"test_fi"];
107 $this->lastsequence =
$row[
"lastindex"];
108 $this->pass =
$row[
"tries"];
109 $this->submitted = (
$row[
"submitted"]) ?
true :
false;
110 $this->submittedTimestamp =
$row[
"submittimestamp"];
111 $this->tstamp =
$row[
"tstamp"];
113 $this->questionSetFilterSelection->setTaxonomySelection(unserialize(
$row[
'taxfilter']));
114 $this->questionSetFilterSelection->setAnswerStatusSelection(
$row[
'answerstatusfilter']);
115 $this->questionSetFilterSelection->setAnswerStatusActiveId(
$row[
'active_id']);
124 $ilDB = $DIC[
'ilDB'];
128 if ($this->active_id > 0) {
129 $affectedRows =
$ilDB->update(
133 'tries' => array(
'integer', $this->
getPass()),
136 'tstamp' => array(
'integer', time() - 10),
141 'active_id' => array(
'integer', $this->
getActiveId())
146 include_once(
"./Modules/Test/classes/class.ilObjTestAccess.php");
147 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
156 $next_id =
$ilDB->nextId(
'tst_active');
157 $affectedRows =
$ilDB->insert(
160 'active_id' => array(
'integer', $next_id),
161 'user_fi' => array(
'integer', $this->
getUserId()),
163 'test_fi' => array(
'integer', $this->
getTestId()),
165 'tries' => array(
'integer', $this->
getPass()),
168 'tstamp' => array(
'integer', time() - 10),
173 $this->active_id = $next_id;
176 include_once(
"./Modules/Test/classes/class.ilObjTestAccess.php");
177 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
185 include_once(
"./Services/Tracking/classes/class.ilLearningProgress.php");
static _getParticipantId($active_id)
Get user id for active id.
getAccessCodeFromSession()
$questionSetFilterSelection
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
static _tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type='')
doesAccessCodeInSessionExists()
loadTestSession($test_id, $user_id="", $anonymous_id="")
static _lookupObjIdForTestId($a_test_id)
Lookup object id for test id.
unsetAccessCodeInSession()
getQuestionSetFilterSelection()
setCurrentQuestionId($currentQuestionId)
setLastSequence($lastsequence)
activeIDExists($user_id, $test_id)
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.