| ILIAS
    Release_4_4_x_branch Revision 61816
    | 
Test session handler. More...
 Inheritance diagram for ilTestSession:
 Inheritance diagram for ilTestSession: Collaboration diagram for ilTestSession:
 Collaboration diagram for ilTestSession:| Public Member Functions | |
| __construct () | |
| ilTestSession constructor | |
| setRefId ($a_val) | |
| Set Ref id. | |
| getRefId () | |
| Get Ref id. | |
| increaseTestPass () | |
| saveToDb () | |
| loadTestSession ($test_id, $user_id="", $anonymous_id="") | |
| loadFromDb ($active_id) | |
| Loads the session data for a given active id. | |
| getActiveId () | |
| setUserId ($user_id) | |
| getUserId () | |
| setTestId ($test_id) | |
| getTestId () | |
| setAnonymousId ($anonymous_id) | |
| getAnonymousId () | |
| setLastSequence ($lastsequence) | |
| getLastSequence () | |
| setPass ($pass) | |
| getPass () | |
| increasePass () | |
| isSubmitted () | |
| setSubmitted () | |
| getSubmittedTimestamp () | |
| setSubmittedTimestamp () | |
| setLastFinishedPass ($lastFinishedPass) | |
| getLastFinishedPass () | |
| persistTestStartLock ($testStartLock) | |
| lookupTestStartLock () | |
| setAccessCodeToSession ($access_code) | |
| unsetAccessCodeInSession () | |
| getAccessCodeFromSession () | |
| doesAccessCodeInSessionExists () | |
| createNewAccessCode () | |
| isAccessCodeUsed ($code) | |
| isAnonymousUser () | |
| Data Fields | |
| const | ACCESS_CODE_SESSION_INDEX = "tst_access_code" | 
| const | ACCESS_CODE_CHAR_DOMAIN = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | 
| const | ACCESS_CODE_LENGTH = 5 | 
| $active_id | |
| $user_id | |
| $anonymous_id | |
| $test_id | |
| $lastsequence | |
| $submitted | |
| $tstamp | |
| $submittedTimestamp | |
| Protected Member Functions | |
| activeIDExists ($user_id, $test_id) | |
| Private Member Functions | |
| buildAccessCode () | |
| Private Attributes | |
| $lastFinishedPass | |
Test session handler.
This class manages the test session for a participant
Definition at line 13 of file class.ilTestSession.php.
| ilTestSession::__construct | ( | ) | 
ilTestSession constructor
The constructor takes possible arguments an creates an instance of the ilTestSession object.
public
Reimplemented in ilTestSessionDynamicQuestionSet.
Definition at line 87 of file class.ilTestSession.php.
| 
 | protected | 
Definition at line 123 of file class.ilTestSession.php.
References $_SESSION, $result, $row, $test_id, $user_id, and setLastFinishedPass().
Referenced by increaseTestPass(), ilTestSessionDynamicQuestionSet\saveToDb(), and saveToDb().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Definition at line 551 of file class.ilTestSession.php.
References ACCESS_CODE_CHAR_DOMAIN, and ACCESS_CODE_LENGTH.
Referenced by createNewAccessCode().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::createNewAccessCode | ( | ) | 
Definition at line 527 of file class.ilTestSession.php.
References buildAccessCode(), and isAccessCodeUsed().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilTestSession::doesAccessCodeInSessionExists | ( | ) | 
Definition at line 517 of file class.ilTestSession.php.
References $_SESSION, and getTestId().
Referenced by ilTestPlayerAbstractGUI\ensureExistingTestSession(), ilTestSessionDynamicQuestionSet\loadTestSession(), and loadTestSession().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::getAccessCodeFromSession | ( | ) | 
Definition at line 502 of file class.ilTestSession.php.
References $_SESSION, ACCESS_CODE_SESSION_INDEX, and getTestId().
Referenced by ilTestPlayerAbstractGUI\ensureExistingTestSession(), ilTestSessionDynamicQuestionSet\loadTestSession(), and loadTestSession().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::getActiveId | ( | ) | 
Definition at line 369 of file class.ilTestSession.php.
References $active_id.
Referenced by ilTestPlayerAbstractGUI\ensureExistingTestSession(), increaseTestPass(), lookupTestStartLock(), persistTestStartLock(), ilTestSessionDynamicQuestionSet\saveToDb(), saveToDb(), and ilTestRandomQuestionSetBuilder\storeQuestion().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::getAnonymousId | ( | ) | 
Definition at line 399 of file class.ilTestSession.php.
References $anonymous_id.
Referenced by increaseTestPass(), ilTestSessionDynamicQuestionSet\saveToDb(), and saveToDb().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::getLastFinishedPass | ( | ) | 
Definition at line 454 of file class.ilTestSession.php.
References $lastFinishedPass.
Referenced by increaseTestPass(), and saveToDb().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::getLastSequence | ( | ) | 
Definition at line 409 of file class.ilTestSession.php.
References $lastsequence.
Referenced by ilTestSessionDynamicQuestionSet\getCurrentQuestionId(), ilTestSequence\hasStarted(), increaseTestPass(), ilTestSessionDynamicQuestionSet\saveToDb(), and saveToDb().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::getPass | ( | ) | 
Definition at line 419 of file class.ilTestSession.php.
References $pass.
Referenced by increaseTestPass(), ilTestSessionDynamicQuestionSet\saveToDb(), saveToDb(), and ilTestRandomQuestionSetBuilder\storeQuestion().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::getRefId | ( | ) | 
Get Ref id.
Definition at line 118 of file class.ilTestSession.php.
References $ref_id.
Referenced by ilTestSessionDynamicQuestionSet\saveToDb(), and saveToDb().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::getSubmittedTimestamp | ( | ) | 
Definition at line 439 of file class.ilTestSession.php.
References $submittedTimestamp.
Referenced by increaseTestPass(), ilTestSessionDynamicQuestionSet\saveToDb(), and saveToDb().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::getTestId | ( | ) | 
Definition at line 389 of file class.ilTestSession.php.
References $test_id.
Referenced by doesAccessCodeInSessionExists(), getAccessCodeFromSession(), increaseTestPass(), isAccessCodeUsed(), ilTestSessionDynamicQuestionSet\saveToDb(), saveToDb(), setAccessCodeToSession(), and unsetAccessCodeInSession().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::getUserId | ( | ) | 
Definition at line 379 of file class.ilTestSession.php.
References $user_id.
Referenced by increaseTestPass(), isAnonymousUser(), ilTestSessionDynamicQuestionSet\saveToDb(), and saveToDb().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::increasePass | ( | ) | 
Definition at line 424 of file class.ilTestSession.php.
Referenced by increaseTestPass().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::increaseTestPass | ( | ) | 
Definition at line 154 of file class.ilTestSession.php.
References $_SESSION, $anonymous_id, $ilLog, $submitted, ilObjTestAccess\_getParticipantId(), ilObjTestAccess\_lookupObjIdForTestId(), ilLPStatusWrapper\_updateStatus(), activeIDExists(), getActiveId(), getAnonymousId(), getLastFinishedPass(), getLastSequence(), getPass(), getSubmittedTimestamp(), getTestId(), getUserId(), increasePass(), isSubmitted(), and setLastSequence().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilTestSession::isAccessCodeUsed | ( | $code | ) | 
Definition at line 538 of file class.ilTestSession.php.
References $query, $result, and getTestId().
Referenced by createNewAccessCode().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::isAnonymousUser | ( | ) | 
Definition at line 569 of file class.ilTestSession.php.
References getUserId().
Referenced by ilTestPlayerAbstractGUI\ensureExistingTestSession().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::isSubmitted | ( | ) | 
Definition at line 429 of file class.ilTestSession.php.
References $submitted.
Referenced by increaseTestPass(), ilTestSessionDynamicQuestionSet\saveToDb(), and saveToDb().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::loadFromDb | ( | $active_id | ) | 
Loads the session data for a given active id.
| integer | $active_id | The database id of the test session | 
Reimplemented in ilTestSessionDynamicQuestionSet.
Definition at line 345 of file class.ilTestSession.php.
References $active_id, $result, $row, and setLastFinishedPass().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilTestSession::loadTestSession | ( | $test_id, | |
| $user_id = "", | |||
| $anonymous_id = "" | |||
| ) | 
Reimplemented in ilTestSessionDynamicQuestionSet.
Definition at line 285 of file class.ilTestSession.php.
References $_SESSION, $anonymous_id, $ilUser, $result, $row, $test_id, $user_id, doesAccessCodeInSessionExists(), getAccessCodeFromSession(), setLastFinishedPass(), and unsetAccessCodeInSession().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilTestSession::lookupTestStartLock | ( | ) | 
Definition at line 470 of file class.ilTestSession.php.
References $res, $row, and getActiveId().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilTestSession::persistTestStartLock | ( | $testStartLock | ) | 
Definition at line 459 of file class.ilTestSession.php.
References getActiveId().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilTestSession::saveToDb | ( | ) | 
Reimplemented in ilTestSessionDynamicQuestionSet.
Definition at line 220 of file class.ilTestSession.php.
References $anonymous_id, $ilLog, $submitted, ilObjTestAccess\_getParticipantId(), ilObjTestAccess\_lookupObjIdForTestId(), ilLearningProgress\_tracProgress(), ilLPStatusWrapper\_updateStatus(), activeIDExists(), getActiveId(), getAnonymousId(), getLastFinishedPass(), getLastSequence(), getPass(), getRefId(), getSubmittedTimestamp(), getTestId(), getUserId(), and isSubmitted().
Referenced by ilTestPlayerAbstractGUI\ensureExistingTestSession().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::setAccessCodeToSession | ( | $access_code | ) | 
Definition at line 487 of file class.ilTestSession.php.
References $_SESSION, ACCESS_CODE_SESSION_INDEX, and getTestId().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilTestSession::setAnonymousId | ( | $anonymous_id | ) | 
Definition at line 394 of file class.ilTestSession.php.
References $anonymous_id.
Referenced by ilTestPlayerAbstractGUI\ensureExistingTestSession().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::setLastFinishedPass | ( | $lastFinishedPass | ) | 
Definition at line 449 of file class.ilTestSession.php.
References $lastFinishedPass.
Referenced by activeIDExists(), loadFromDb(), and loadTestSession().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::setLastSequence | ( | $lastsequence | ) | 
Definition at line 404 of file class.ilTestSession.php.
References $lastsequence.
Referenced by increaseTestPass(), and ilTestSessionDynamicQuestionSet\setCurrentQuestionId().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::setPass | ( | $pass | ) | 
| ilTestSession::setRefId | ( | $a_val | ) | 
Set Ref id.
| integer | Ref id | 
Definition at line 108 of file class.ilTestSession.php.
| ilTestSession::setSubmitted | ( | ) | 
Definition at line 434 of file class.ilTestSession.php.
| ilTestSession::setSubmittedTimestamp | ( | ) | 
Definition at line 444 of file class.ilTestSession.php.
| ilTestSession::setTestId | ( | $test_id | ) | 
Definition at line 384 of file class.ilTestSession.php.
References $test_id.
| ilTestSession::setUserId | ( | $user_id | ) | 
Definition at line 374 of file class.ilTestSession.php.
References $user_id.
Referenced by ilTestPlayerAbstractGUI\ensureExistingTestSession().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::unsetAccessCodeInSession | ( | ) | 
Definition at line 497 of file class.ilTestSession.php.
References $_SESSION, and getTestId().
Referenced by ilTestSessionDynamicQuestionSet\loadTestSession(), and loadTestSession().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTestSession::$active_id | 
Definition at line 26 of file class.ilTestSession.php.
Referenced by getActiveId(), ilTestSessionDynamicQuestionSet\loadFromDb(), and loadFromDb().
| ilTestSession::$anonymous_id | 
Definition at line 40 of file class.ilTestSession.php.
Referenced by getAnonymousId(), increaseTestPass(), ilTestSessionDynamicQuestionSet\loadTestSession(), loadTestSession(), ilTestSessionDynamicQuestionSet\saveToDb(), saveToDb(), and setAnonymousId().
| 
 | private | 
Definition at line 77 of file class.ilTestSession.php.
Referenced by getLastFinishedPass(), and setLastFinishedPass().
| ilTestSession::$lastsequence | 
Definition at line 54 of file class.ilTestSession.php.
Referenced by getLastSequence(), and setLastSequence().
| ilTestSession::$submitted | 
Definition at line 61 of file class.ilTestSession.php.
Referenced by increaseTestPass(), isSubmitted(), ilTestSessionDynamicQuestionSet\saveToDb(), and saveToDb().
| ilTestSession::$submittedTimestamp | 
Definition at line 75 of file class.ilTestSession.php.
Referenced by getSubmittedTimestamp().
| ilTestSession::$test_id | 
Definition at line 47 of file class.ilTestSession.php.
Referenced by activeIDExists(), getTestId(), ilTestSessionDynamicQuestionSet\loadTestSession(), loadTestSession(), and setTestId().
| ilTestSession::$tstamp | 
Definition at line 68 of file class.ilTestSession.php.
| ilTestSession::$user_id | 
Definition at line 33 of file class.ilTestSession.php.
Referenced by activeIDExists(), getUserId(), ilTestSessionDynamicQuestionSet\loadTestSession(), loadTestSession(), and setUserId().
| const ilTestSession::ACCESS_CODE_CHAR_DOMAIN = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | 
Definition at line 17 of file class.ilTestSession.php.
Referenced by buildAccessCode().
| const ilTestSession::ACCESS_CODE_LENGTH = 5 | 
Definition at line 19 of file class.ilTestSession.php.
Referenced by buildAccessCode().
| const ilTestSession::ACCESS_CODE_SESSION_INDEX = "tst_access_code" | 
Definition at line 15 of file class.ilTestSession.php.
Referenced by getAccessCodeFromSession(), and setAccessCodeToSession().