ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Class ilObjTestAccess. More...
Public Member Functions | |
_checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="") | |
Checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More... | |
Public Member Functions inherited from ilObjectAccess | |
_checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="") | |
Checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More... | |
_checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id) | |
check condition More... | |
Static Public Member Functions | |
static | _isPassed ($user_id, $a_obj_id) |
Returns TRUE if the user with the user id $user_id passed the test with the object id $a_obj_id. More... | |
static | isFailed ($user_id, $a_obj_id) |
Returns TRUE if the user with the user id $user_id failed the test with the object id $a_obj_id. More... | |
static | getConditionOperators () |
Get possible conditions operators. More... | |
static | checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id) |
check condition More... | |
static | _getCommands () |
get commands More... | |
static | _lookupCreationComplete ($a_obj_id) |
checks wether all necessary parts of the test are given More... | |
static | hasFinished ($a_user_id, $a_obj_id) |
Returns (request cached) information if a specific user has finished at least one test pass. More... | |
static | _getTestIDFromObjectID ($object_id) |
Returns the ILIAS test id for a given object id. More... | |
static | _lookupObjIdForTestId ($a_test_id) |
Lookup object id for test id. More... | |
static | _getRandomTestsForQuestionPool ($qpl_id) |
Get all tests using a question pool for random selection. More... | |
static | _lookupOnlineTestAccess ($a_test_id, $a_user_id) |
Checks if a user is allowd to run an online exam. More... | |
static | _getParticipantData ($active_id) |
Retrieves a participant name from active id. More... | |
static | _getParticipantId ($active_id) |
Get user id for active id. More... | |
static | _getPassedUsers ($a_obj_id) |
Returns an array containing the users who passed the test. More... | |
static | _checkGoto ($a_target) |
check whether goto script will succeed More... | |
static | _isOffline ($a_obj_id) |
returns the objects's OFFline status More... | |
static | _isOnline ($a_obj_id) |
returns the objects's ONline status More... | |
static | visibleUserResultExists ($testObjId, $userId) |
static | hasVisibleCertificate ($testObjId, $userId) |
Andre Michels amich els@ datab ay.d eMore... | |
Static Public Member Functions inherited from ilObjectAccess | |
static | _getCommands () |
get commands More... | |
static | _checkGoto ($a_target) |
check whether goto script will succeed More... | |
static | _isOffline ($a_obj_id) |
Type-specific implementation of general status, has to be overwritten. More... | |
static | _preloadData ($a_obj_ids, $a_ref_ids) |
Preload data. More... | |
Static Protected Member Functions | |
static | updateTestResultCache ($a_user_id, $a_obj_id) |
Update test result cache. More... | |
Static Private Attributes | |
static | $hasFinishedCache = array() |
Class ilObjTestAccess.
This class contains methods that check object specific conditions for accessing test objects.
Definition at line 20 of file class.ilObjTestAccess.php.
ilObjTestAccess::_checkAccess | ( | $a_cmd, | |
$a_permission, | |||
$a_ref_id, | |||
$a_obj_id, | |||
$a_user_id = "" |
|||
) |
Checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess)
Please do not check any preconditions handled by ilConditionHandler here.
string | $a_cmd | command (not permission!) |
string | $a_permission | permission |
int | $a_ref_id | reference id |
int | $a_obj_id | object id |
int | $a_user_id | user id (if not provided, current user is taken) |
Definition at line 37 of file class.ilObjTestAccess.php.
References $ilUser, $lng, _lookupCreationComplete(), and IL_NO_OBJECT_ACCESS.
|
static |
check whether goto script will succeed
Definition at line 767 of file class.ilObjTestAccess.php.
|
static |
get commands
this method returns an array of all possible commands/permission combinations
example: $commands = array ( array("permission" => "read", "cmd" => "view", "lang_var" => "show"), array("permission" => "write", "cmd" => "edit", "lang_var" => "edit"), );
Definition at line 371 of file class.ilObjTestAccess.php.
References array.
Referenced by ilObjTestListGUI\init().
|
static |
Retrieves a participant name from active id.
integer | $active_id | Active ID of the participant |
Definition at line 596 of file class.ilObjTestAccess.php.
References $ilDB, $lng, $result, $row, ilObjTest\_lookupAnonymity(), ilObjUser\_lookupName(), and array.
Referenced by assQuestion\_setReachedPoints(), ilTestResultsToXML\exportActiveIDs(), ilObjTest\getManualFeedback(), and ilObjTestGUI\participantsObject().
|
static |
Get user id for active id.
int | active ID of the participant |
Definition at line 655 of file class.ilObjTestAccess.php.
References $ilDB, $lng, $result, $row, and array.
Referenced by ilTestScoringByQuestionsGUI\__construct(), assFileUpload\handleSubmission(), ilTestScoringGUI\saveManScoringParticipantScreen(), ilTestSessionDynamicQuestionSet\saveToDb(), and ilTestPassFinishTasks\updateLearningProgressAfterPassFinishedIsWritten().
|
static |
Returns an array containing the users who passed the test.
Definition at line 682 of file class.ilObjTestAccess.php.
References $data, $ilDB, $result, $row, assQuestion\_updateTestResultCache(), and array.
Referenced by ilLPStatusTestPassed\_getStatusInfo().
|
static |
Get all tests using a question pool for random selection.
int | question pool id |
Definition at line 504 of file class.ilObjTestAccess.php.
References $ilDB, $query, $result, $row, and array.
Referenced by ilObjMediaObjectAccess\checkAccessTestQuestion().
|
static |
Returns the ILIAS test id for a given object id.
integer | $object_id | The object id |
Definition at line 462 of file class.ilObjTestAccess.php.
References $ilDB, $result, $row, and array.
Referenced by ilLPStatusTestFinished\getParticipants().
|
static |
returns the objects's OFFline status
Used in ListGUI and Learning Progress
int | $a_obj_id |
Definition at line 793 of file class.ilObjTestAccess.php.
|
static |
returns the objects's ONline status
integer | $a_obj_id |
Definition at line 807 of file class.ilObjTestAccess.php.
References $ilDB, $query, $result, and array.
Referenced by ilLOEditorStatus\checkTestOnline(), and ilObjTestListGUI\getProperties().
|
static |
Returns TRUE if the user with the user id $user_id passed the test with the object id $a_obj_id.
int | $user_id | The user id |
int | $a_obj_id | The object id |
Definition at line 91 of file class.ilObjTestAccess.php.
References $ilDB, $pass, $res, $result, $row, ASS_MarkSchema\_getMatchingMarkFromObjId(), assQuestion\_updateTestResultCache(), and array.
Referenced by checkCondition(), and ilLPStatusTestPassed\determineStatus().
|
static |
checks wether all necessary parts of the test are given
Definition at line 394 of file class.ilObjTestAccess.php.
References $ilDB, $result, $row, and array.
Referenced by _checkAccess().
|
static |
Lookup object id for test id.
int | test id |
Definition at line 484 of file class.ilObjTestAccess.php.
References $ilDB, $result, $row, and array.
Referenced by ilTestSessionDynamicQuestionSet\saveToDb().
|
static |
Checks if a user is allowd to run an online exam.
Definition at line 534 of file class.ilObjTestAccess.php.
References $_SERVER, $ilDB, $lng, $result, $row, and array.
Referenced by ilTestInfoScreenToolbarGUI\build(), ilObjTestGUI\buildPageViewToolbar(), ilObjTestListGUI\getProperties(), and ilObjTestGUI\questionsObject().
|
static |
check condition
this method is called by ilConditionHandler
Implements ilConditionHandling.
Definition at line 334 of file class.ilObjTestAccess.php.
References _isPassed(), hasFinished(), isFailed(), ilConditionHandler\OPERATOR_FAILED, ilConditionHandler\OPERATOR_FINISHED, ilConditionHandler\OPERATOR_NOT_FINISHED, and ilConditionHandler\OPERATOR_PASSED.
Referenced by ilContainerObjectiveGUI\getMainContent(), ilContainerStartObjects\isFullfilled(), ilCourseStart\isFullfilled(), and ilContainerObjectiveGUI\renderObjective().
|
static |
Get possible conditions operators.
Implements ilConditionHandling.
Definition at line 317 of file class.ilObjTestAccess.php.
References array, ilConditionHandler\OPERATOR_FAILED, ilConditionHandler\OPERATOR_FINISHED, ilConditionHandler\OPERATOR_NOT_FINISHED, and ilConditionHandler\OPERATOR_PASSED.
|
static |
Returns (request cached) information if a specific user has finished at least one test pass.
integer | $a_user_id | obj_id of the user |
integer | $a_obj_id | obj_id of the test |
Definition at line 424 of file class.ilObjTestAccess.php.
References $ilDB, $lng, array, and ilObjectFactory\getInstanceByObjId().
Referenced by checkCondition().
|
static |
Andre Michels amich els@ datab ay.d e
$testObjId | |
$userId |
Definition at line 846 of file class.ilObjTestAccess.php.
References ilObjectFactory\getInstanceByObjId().
|
static |
Returns TRUE if the user with the user id $user_id failed the test with the object id $a_obj_id.
int | $user_id | The user id |
int | $a_obj_id | The object id |
Definition at line 191 of file class.ilObjTestAccess.php.
References $ilDB, $pass, $res, $result, $ret, $row, ASS_MarkSchema\_getMatchingMarkFromObjId(), and array.
Referenced by checkCondition().
|
staticprotected |
Update test result cache.
type | $a_user_id | |
type | $a_obj_id |
Definition at line 277 of file class.ilObjTestAccess.php.
References $ilDB, $result, $row, assQuestion\_updateTestResultCache(), and array.
|
static |
Definition at line 823 of file class.ilObjTestAccess.php.
References ilObjectFactory\getInstanceByObjId().
Referenced by ilLOUtils\getTestResultLinkForUser(), and ilObjTestListGUI\handleUserResultsCommand().
|
staticprivate |
Definition at line 415 of file class.ilObjTestAccess.php.