ILIAS
release_8 Revision v8.19-1-g4e8f2f9140c
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Data Fields | |
const | ACCESS_CODE_SESSION_INDEX = "tst_access_code" |
const | ACCESS_CODE_CHAR_DOMAIN = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
const | ACCESS_CODE_LENGTH = 5 |
int | $active_id |
int | $user_id |
$anonymous_id = null | |
int | $test_id |
int | $lastsequence |
bool | $submitted |
int | $tstamp |
string | $submittedTimestamp |
Protected Member Functions | |
activeIDExists ($user_id, $test_id) | |
Protected Attributes | |
string | $lastPresentationMode |
Private Member Functions | |
buildAccessCode () | |
Private Attributes | |
int | $ref_id |
int | $pass |
int | $objectiveOrientedContainerId |
$lastFinishedPass | |
$lastStartedPass | |
$reportableResultsAvailable = null | |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Test session handler
This class manages the test session for a participant
Definition at line 28 of file class.ilTestSession.php.
ilTestSession::__construct | ( | ) |
ilTestSession constructor
The constructor takes possible arguments an creates an instance of the ilTestSession object.
public
Definition at line 60 of file class.ilTestSession.php.
|
protected |
Definition at line 89 of file class.ilTestSession.php.
References $DIC, $GLOBALS, $ilDB, ANONYMOUS_USER_ID, ILIAS\Survey\Mode\getId(), ILIAS\Repository\int(), setLastFinishedPass(), setLastStartedPass(), and setObjectiveOrientedContainerId().
Referenced by ilTestSessionDynamicQuestionSet\saveToDb(), and saveToDb().
|
private |
Definition at line 533 of file class.ilTestSession.php.
Referenced by createNewAccessCode().
ilTestSession::createNewAccessCode | ( | ) |
Definition at line 508 of file class.ilTestSession.php.
References buildAccessCode(), and isAccessCodeUsed().
ilTestSession::doesAccessCodeInSessionExists | ( | ) |
Definition at line 495 of file class.ilTestSession.php.
References ilSession\get(), and getTestId().
Referenced by ilTestPlayerAbstractGUI\ensureExistingTestSession(), ilTestSessionDynamicQuestionSet\loadTestSession(), and loadTestSession().
ilTestSession::getAccessCodeFromSession | ( | ) |
Definition at line 482 of file class.ilTestSession.php.
References ilSession\get(), and getTestId().
Referenced by ilTestPlayerAbstractGUI\ensureExistingTestSession(), ilTestSessionDynamicQuestionSet\loadTestSession(), and loadTestSession().
ilTestSession::getActiveId | ( | ) |
Definition at line 305 of file class.ilTestSession.php.
References $active_id.
Referenced by ilTestService\buildVirtualSequence(), ilObjTest\canShowTestResults(), ilTestPlayerAbstractGUI\ensureExistingTestSession(), ilTestServiceGUI\getPassOverviewTableData(), ilTestPlayerAbstractGUI\handleSkillTriggering(), ilObjTest\hasAnyTestResult(), hasSinglePassReportable(), increaseTestPass(), lookupTestStartLock(), persistTestStartLock(), reportableResultsAvailable(), ilTestSessionDynamicQuestionSet\saveToDb(), saveToDb(), ilTestRandomQuestionSetBuilder\storeQuestion(), and ilLOTestQuestionAdapter\updateQuestionResult().
ilTestSession::getAnonymousId | ( | ) |
Definition at line 342 of file class.ilTestSession.php.
References $anonymous_id.
Referenced by ilTestSessionDynamicQuestionSet\saveToDb(), and saveToDb().
ilTestSession::getLastFinishedPass | ( | ) |
Definition at line 397 of file class.ilTestSession.php.
References $lastFinishedPass.
Referenced by ilObjTest\canShowTestResults(), ilObjTest\hasAnyTestResult(), hasSinglePassReportable(), increaseTestPass(), and saveToDb().
ilTestSession::getLastSequence | ( | ) |
Definition at line 352 of file class.ilTestSession.php.
References $lastsequence.
Referenced by ilTestSessionDynamicQuestionSet\getCurrentQuestionId(), ilTestSequence\hasStarted(), increaseTestPass(), ilTestSessionDynamicQuestionSet\saveToDb(), and saveToDb().
ilTestSession::getLastStartedPass | ( | ) |
Definition at line 415 of file class.ilTestSession.php.
References $lastStartedPass.
Referenced by increaseTestPass().
ilTestSession::getObjectiveOrientedContainerId | ( | ) |
Definition at line 407 of file class.ilTestSession.php.
References $objectiveOrientedContainerId.
Referenced by ilLOTestQuestionAdapter\getInstance(), increaseTestPass(), isObjectiveOriented(), ilLOTestQuestionAdapter\notifyTestStart(), and saveToDb().
ilTestSession::getPass | ( | ) |
Definition at line 362 of file class.ilTestSession.php.
References $pass.
Referenced by ilTestPlayerAbstractGUI\handleSkillTriggering(), increaseTestPass(), ilTestSessionDynamicQuestionSet\saveToDb(), saveToDb(), ilTestRandomQuestionSetBuilder\storeQuestion(), and ilLOTestQuestionAdapter\updateQuestionResult().
ilTestSession::getRefId | ( | ) |
Definition at line 84 of file class.ilTestSession.php.
References $ref_id.
Referenced by ilLOTestQuestionAdapter\getInstance(), ilLOTestQuestionAdapter\initTestRun(), ilLOTestQuestionAdapter\initUserResult(), ilLOTestQuestionAdapter\isQualifiedStartRun(), ilLOTestQuestionAdapter\notifyTestStart(), ilTestSessionDynamicQuestionSet\saveToDb(), ilLOTestQuestionAdapter\updateFixedQuestions(), ilLOTestQuestionAdapter\updateQuestionResult(), ilLOTestQuestionAdapter\updateQuestions(), and ilLOTestQuestionAdapter\updateRandomQuestions().
ilTestSession::getSubmittedTimestamp | ( | ) |
Definition at line 382 of file class.ilTestSession.php.
References $submittedTimestamp.
Referenced by increaseTestPass(), ilTestSessionDynamicQuestionSet\saveToDb(), and saveToDb().
ilTestSession::getTestId | ( | ) |
Definition at line 325 of file class.ilTestSession.php.
References $test_id.
Referenced by doesAccessCodeInSessionExists(), getAccessCodeFromSession(), isAccessCodeUsed(), ilTestSessionDynamicQuestionSet\saveToDb(), saveToDb(), setAccessCodeToSession(), and unsetAccessCodeInSession().
ilTestSession::getUserId | ( | ) |
Definition at line 315 of file class.ilTestSession.php.
References $user_id.
Referenced by ilTestPlayerAbstractGUI\checkTestSessionUser(), ilLOTestQuestionAdapter\getInstance(), ilTestPlayerAbstractGUI\handleSkillTriggering(), isAnonymousUser(), ilLOTestQuestionAdapter\notifyTestStart(), ilTestSessionDynamicQuestionSet\saveToDb(), and saveToDb().
ilTestSession::hasSinglePassReportable | ( | ilObjTest | $testObj | ) |
Definition at line 597 of file class.ilTestSession.php.
References $DIC, getActiveId(), getLastFinishedPass(), and ilTestPassesSelector\setActiveId().
ilTestSession::increasePass | ( | ) |
Definition at line 367 of file class.ilTestSession.php.
Referenced by increaseTestPass().
ilTestSession::increaseTestPass | ( | ) |
Definition at line 122 of file class.ilTestSession.php.
References $DIC, $ilDB, ilSession\get(), getActiveId(), getLastFinishedPass(), getLastSequence(), getLastStartedPass(), getObjectiveOrientedContainerId(), getPass(), getSubmittedTimestamp(), increasePass(), isSubmitted(), and setLastSequence().
ilTestSession::isAccessCodeUsed | ( | $code | ) |
Definition at line 517 of file class.ilTestSession.php.
References $DIC, $ilDB, $query, and getTestId().
Referenced by createNewAccessCode().
ilTestSession::isAnonymousUser | ( | ) |
Definition at line 550 of file class.ilTestSession.php.
References ANONYMOUS_USER_ID, and getUserId().
Referenced by ilTestPlayerAbstractGUI\ensureExistingTestSession().
ilTestSession::isObjectiveOriented | ( | ) |
Definition at line 428 of file class.ilTestSession.php.
References getObjectiveOrientedContainerId().
ilTestSession::isPasswordChecked | ( | ) |
Definition at line 555 of file class.ilTestSession.php.
References ilSession\get().
ilTestSession::isSubmitted | ( | ) |
Definition at line 372 of file class.ilTestSession.php.
References $submitted.
Referenced by increaseTestPass(), ilTestSessionDynamicQuestionSet\saveToDb(), and saveToDb().
ilTestSession::loadFromDb | ( | $active_id | ) |
Loads the session data for a given active id.
integer | $active_id | The database id of the test session |
Definition at line 278 of file class.ilTestSession.php.
References $DIC, $ilDB, setLastFinishedPass(), setLastStartedPass(), and setObjectiveOrientedContainerId().
ilTestSession::loadTestSession | ( | $test_id, | |
$user_id = "" , |
|||
$anonymous_id = "" |
|||
) |
Definition at line 218 of file class.ilTestSession.php.
References $anonymous_id, $DIC, $GLOBALS, $ilDB, $ilUser, $user_id, ANONYMOUS_USER_ID, doesAccessCodeInSessionExists(), getAccessCodeFromSession(), ILIAS\Survey\Mode\getId(), setLastFinishedPass(), setLastStartedPass(), setObjectiveOrientedContainerId(), and unsetAccessCodeInSession().
ilTestSession::lookupTestStartLock | ( | ) |
Definition at line 445 of file class.ilTestSession.php.
References $DIC, $ilDB, $res, and getActiveId().
ilTestSession::persistTestStartLock | ( | $testStartLock | ) |
Definition at line 433 of file class.ilTestSession.php.
References $DIC, $ilDB, and getActiveId().
ilTestSession::reportableResultsAvailable | ( | ilObjTest | $testOBJ | ) |
ilObjTest | $testOBJ |
Definition at line 577 of file class.ilTestSession.php.
References $reportableResultsAvailable, ilObjTest\canShowTestResults(), and getActiveId().
ilTestSession::saveToDb | ( | ) |
Definition at line 167 of file class.ilTestSession.php.
References $anonymous_id, $DIC, $ilDB, activeIDExists(), getActiveId(), getAnonymousId(), getLastFinishedPass(), getLastSequence(), getObjectiveOrientedContainerId(), getPass(), getSubmittedTimestamp(), getTestId(), getUserId(), and isSubmitted().
Referenced by ilTestPlayerAbstractGUI\ensureExistingTestSession().
ilTestSession::setAccessCodeToSession | ( | $access_code | ) |
Definition at line 463 of file class.ilTestSession.php.
References ilSession\get(), getTestId(), and ilSession\set().
ilTestSession::setAnonymousId | ( | $anonymous_id | ) |
int | null | string | $anonymous_id |
Definition at line 334 of file class.ilTestSession.php.
References $anonymous_id.
Referenced by ilTestPlayerAbstractGUI\ensureExistingTestSession().
ilTestSession::setLastFinishedPass | ( | $lastFinishedPass | ) |
Definition at line 392 of file class.ilTestSession.php.
References $lastFinishedPass.
Referenced by activeIDExists(), loadFromDb(), and loadTestSession().
ilTestSession::setLastSequence | ( | $lastsequence | ) |
Definition at line 347 of file class.ilTestSession.php.
References $lastsequence.
Referenced by increaseTestPass(), and ilTestSessionDynamicQuestionSet\setCurrentQuestionId().
ilTestSession::setLastStartedPass | ( | $lastStartedPass | ) |
int | $lastStartedPass |
Definition at line 423 of file class.ilTestSession.php.
References $lastStartedPass.
Referenced by activeIDExists(), loadFromDb(), and loadTestSession().
ilTestSession::setObjectiveOrientedContainerId | ( | $objectiveOriented | ) |
Definition at line 402 of file class.ilTestSession.php.
Referenced by activeIDExists(), loadFromDb(), and loadTestSession().
ilTestSession::setPass | ( | $pass | ) |
ilTestSession::setPasswordChecked | ( | bool | $value | ) |
Definition at line 563 of file class.ilTestSession.php.
References ilSession\set().
ilTestSession::setRefId | ( | int | $a_val | ) |
Definition at line 79 of file class.ilTestSession.php.
ilTestSession::setSubmitted | ( | ) |
Definition at line 377 of file class.ilTestSession.php.
ilTestSession::setSubmittedTimestamp | ( | ) |
Definition at line 387 of file class.ilTestSession.php.
ilTestSession::setTestId | ( | $test_id | ) |
ilTestSession::setUserId | ( | $user_id | ) |
Definition at line 310 of file class.ilTestSession.php.
References $user_id.
Referenced by ilTestPlayerAbstractGUI\ensureExistingTestSession().
ilTestSession::unsetAccessCodeInSession | ( | ) |
Definition at line 474 of file class.ilTestSession.php.
References ilSession\get(), getTestId(), and ilSession\set().
Referenced by ilTestSessionDynamicQuestionSet\loadTestSession(), and loadTestSession().
int ilTestSession::$active_id |
Definition at line 36 of file class.ilTestSession.php.
Referenced by getActiveId(), and ilTestSessionDynamicQuestionSet\loadFromDb().
ilTestSession::$anonymous_id = null |
Definition at line 39 of file class.ilTestSession.php.
Referenced by getAnonymousId(), ilTestSessionDynamicQuestionSet\loadTestSession(), loadTestSession(), ilTestSessionDynamicQuestionSet\saveToDb(), saveToDb(), and setAnonymousId().
|
private |
Definition at line 48 of file class.ilTestSession.php.
Referenced by getLastFinishedPass(), and setLastFinishedPass().
|
protected |
Definition at line 42 of file class.ilTestSession.php.
int ilTestSession::$lastsequence |
Definition at line 41 of file class.ilTestSession.php.
Referenced by getLastSequence(), and setLastSequence().
|
private |
Definition at line 49 of file class.ilTestSession.php.
Referenced by getLastStartedPass(), and setLastStartedPass().
|
private |
Definition at line 46 of file class.ilTestSession.php.
Referenced by getObjectiveOrientedContainerId().
|
private |
Definition at line 35 of file class.ilTestSession.php.
|
private |
Definition at line 34 of file class.ilTestSession.php.
Referenced by getRefId().
|
private |
Definition at line 571 of file class.ilTestSession.php.
Referenced by reportableResultsAvailable().
bool ilTestSession::$submitted |
Definition at line 43 of file class.ilTestSession.php.
Referenced by isSubmitted(), and ilTestSessionDynamicQuestionSet\saveToDb().
string ilTestSession::$submittedTimestamp |
Definition at line 45 of file class.ilTestSession.php.
Referenced by getSubmittedTimestamp().
int ilTestSession::$test_id |
Definition at line 40 of file class.ilTestSession.php.
Referenced by getTestId(), ilTestSessionDynamicQuestionSet\loadTestSession(), and setTestId().
int ilTestSession::$tstamp |
Definition at line 44 of file class.ilTestSession.php.
int ilTestSession::$user_id |
Definition at line 37 of file class.ilTestSession.php.
Referenced by getUserId(), ilTestSessionDynamicQuestionSet\loadTestSession(), loadTestSession(), and setUserId().
const ilTestSession::ACCESS_CODE_CHAR_DOMAIN = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
Definition at line 31 of file class.ilTestSession.php.
const ilTestSession::ACCESS_CODE_LENGTH = 5 |
Definition at line 32 of file class.ilTestSession.php.
const ilTestSession::ACCESS_CODE_SESSION_INDEX = "tst_access_code" |
Definition at line 30 of file class.ilTestSession.php.
Referenced by ILIAS\Modules\Test\AccessFileUploadAnswer\accessCodeOk(), ILIAS\Modules\Test\test\AccessFileUploadAnswerTest\testAnonymousWithInvalidAccessCode(), ILIAS\Modules\Test\test\AccessFileUploadAnswerTest\testAnonymousWithoutAccessCode(), ILIAS\Modules\Test\test\AccessFileUploadAnswerTest\testAnonymousWithValidAccessCode(), ilTestSessionTest\testSetAccessCodeToSession(), ilTestSessionTest\testUnsetAccessCodeInSession(), and ILIAS\Modules\Test\test\AccessFileUploadAnswerTest\testUserWhichCanAccessTheTestResults().