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();
43 "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']);
75 "SELECT * FROM tst_active WHERE user_fi = %s AND test_fi = %s AND anonymous_id = %s",
76 array(
'integer',
'integer',
'text'),
81 "SELECT * FROM tst_active WHERE user_fi = %s AND test_fi = %s AND anonymous_id = %s",
82 array(
'integer',
'integer',
'text'),
86 if (
$GLOBALS[
'DIC'][
'ilUser']->getId() == ANONYMOUS_USER_ID) {
90 "SELECT * FROM tst_active WHERE user_fi = %s AND test_fi = %s",
91 array(
'integer',
'integer'),
101 $this->active_id =
$row[
"active_id"];
102 $this->user_id =
$row[
"user_fi"];
103 $this->anonymous_id =
$row[
"anonymous_id"];
104 $this->test_id =
$row[
"test_fi"];
105 $this->lastsequence =
$row[
"lastindex"];
106 $this->pass =
$row[
"tries"];
107 $this->submitted = (
$row[
"submitted"]) ?
true :
false;
108 $this->submittedTimestamp =
$row[
"submittimestamp"];
109 $this->tstamp =
$row[
"tstamp"];
111 $this->questionSetFilterSelection->setTaxonomySelection(unserialize(
$row[
'taxfilter']));
112 $this->questionSetFilterSelection->setAnswerStatusSelection(
$row[
'answerstatusfilter']);
113 $this->questionSetFilterSelection->setAnswerStatusActiveId(
$row[
'active_id']);
124 if ($this->active_id > 0) {
125 $affectedRows = $ilDB->update(
142 include_once(
"./Modules/Test/classes/class.ilObjTestAccess.php");
143 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
152 $next_id = $ilDB->nextId(
'tst_active');
153 $affectedRows = $ilDB->insert(
156 'active_id' =>
array(
'integer', $next_id),
169 $this->active_id = $next_id;
172 include_once(
"./Modules/Test/classes/class.ilObjTestAccess.php");
173 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
181 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.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
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)
Create styles array
The data for the language used.
setLastSequence($lastsequence)
activeIDExists($user_id, $test_id)
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.