|
ILIAS
release_8 Revision v8.24
|
Class ilObjTestAccess. More...
Inheritance diagram for ilObjTestAccess:
Collaboration diagram for ilObjTestAccess:Public Member Functions | |
| canBeDelivered (ilWACPath $ilWACPath) | |
| _checkAccess (string $cmd, string $permission, int $ref_id, int $obj_id, int $user_id=null) | |
| 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 (string $cmd, string $permission, int $ref_id, int $obj_id, ?int $user_id=null) | |
| Checks whether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More... | |
| canBeDelivered (ilWACPath $ilWACPath) | |
| canBeDelivered (ilWACPath $ilWACPath) | |
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 (int $a_trigger_obj_id, string $a_operator, string $a_value, int $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 (string $target) |
| check whether goto script will succeed More... | |
| static | _isOffline (int $obj_id) |
| returns the objects's OFFline status More... | |
| static | visibleUserResultExists ($testObjId, $userId) |
Static Public Member Functions inherited from ilObjectAccess | |
| static | _getCommands () |
| get commands More... | |
| static | _checkGoto (string $target) |
| check whether goto script will succeed More... | |
| static | _isOffline (int $obj_id) |
| Type-specific implementation of general status, has to be overwritten if object type does not support centralized offline handling. More... | |
| static | _preloadData (array $obj_ids, array $ref_ids) |
| Preload data. More... | |
| static | getConditionOperators () |
| Returns an array with valid operators for the specific object type. More... | |
| static | checkCondition (int $a_trigger_obj_id, string $a_operator, string $a_value, int $a_usr_id) |
| check condition for a specific user and object More... | |
Static Protected Member Functions | |
| static | updateTestResultCache ($a_user_id, $a_obj_id) |
Private Member Functions | |
| findMatch (string $path, array $array) | |
Static Private Attributes | |
| static | $hasFinishedCache = array() |
Class ilObjTestAccess.
This class contains methods that check object specific conditions for accessing test objects.
Definition at line 39 of file class.ilObjTestAccess.php.
| ilObjTestAccess::_checkAccess | ( | string | $cmd, |
| string | $permission, | ||
| int | $ref_id, | ||
| int | $obj_id, | ||
| int | $user_id = null |
||
| ) |
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.
Definition at line 70 of file class.ilObjTestAccess.php.
References $DIC, $ilUser, $lng, $ref_id, _lookupCreationComplete(), and ilAccessInfo\IL_NO_OBJECT_ACCESS.
Here is the call graph for this function:
|
static |
check whether goto script will succeed
Reimplemented from ilObjectAccess.
Definition at line 735 of file class.ilObjTestAccess.php.
References $DIC.
|
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"), );
Reimplemented from ilObjectAccess.
Definition at line 357 of file class.ilObjTestAccess.php.
References $DIC.
Referenced by ilObjTestListGUI\init().
Here is the caller graph for this function:
|
static |
Retrieves a participant name from active id.
| integer | $active_id | Active ID of the participant |
Definition at line 582 of file class.ilObjTestAccess.php.
References $DIC, $ilDB, $lng, $name, ilObjTest\_lookupAnonymity(), ilObjUser\_lookupName(), and ANONYMOUS_USER_ID.
Referenced by assQuestion\_setReachedPoints(), ilTestParticipantList\buildParticipantsFullname(), ilTestResultsToXML\exportActiveIDs(), ilTestParticipantData\getFormatedFullnameByActiveId(), ilTestParticipantData\getOptionArray(), and ilObjTest\logManualFeedback().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Get user id for active id.
| int | active ID of the participant |
Definition at line 634 of file class.ilObjTestAccess.php.
References $DIC, $ilDB, and $lng.
Referenced by assFileUpload\handleSubmission(), ilTestScoringGUI\saveManScoringParticipantScreen(), ilTestSessionDynamicQuestionSet\saveToDb(), and ilTestPassFinishTasks\updateLearningProgressAfterPassFinishedIsWritten().
Here is the caller graph for this function:
|
static |
Returns an array containing the users who passed the test.
Definition at line 664 of file class.ilObjTestAccess.php.
References $data, $DIC, $ilDB, and assQuestion\_updateTestResultCache().
Referenced by ilLPStatusTestPassed\_getStatusInfo().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Get all tests using a question pool for random selection.
| int | question pool id |
Definition at line 500 of file class.ilObjTestAccess.php.
|
static |
Returns the ILIAS test id for a given object id.
| integer | $object_id | The object id |
Definition at line 455 of file class.ilObjTestAccess.php.
Referenced by ilLPStatusTestFinished\getParticipants(), and ilSoapTestAdministration\getTestAccess().
Here is the caller graph for this function:
|
static |
returns the objects's OFFline status
Used in ListGUI and Learning Progress
Reimplemented from ilObjectAccess.
Definition at line 758 of file class.ilObjTestAccess.php.
References ilObject\lookupOfflineStatus().
Referenced by ilLOEditorStatus\checkTestOnline().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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 117 of file class.ilObjTestAccess.php.
References $DIC, $ilDB, $res, ASS_MarkSchema\_getMatchingMarkFromObjId(), assQuestion\_updateTestResultCache(), and true.
Referenced by checkCondition(), ilLPStatusTestPassed\determineStatus(), and ilObjTest\isExecutable().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
checks wether all necessary parts of the test are given
Definition at line 384 of file class.ilObjTestAccess.php.
Referenced by _checkAccess().
Here is the caller graph for this function:
|
static |
Lookup object id for test id.
| int | test id |
Definition at line 478 of file class.ilObjTestAccess.php.
Referenced by ilTestSessionDynamicQuestionSet\saveToDb().
Here is the caller graph for this function:
|
static |
Checks if a user is allowd to run an online exam.
Definition at line 530 of file class.ilObjTestAccess.php.
References $_SERVER, $DIC, $ilDB, and $lng.
Referenced by ilTestInfoScreenToolbarGUI\build(), ilObjTestGUI\buildPageViewToolbar(), and ilObjTestListGUI\getProperties().
Here is the caller graph for this function:| ilObjTestAccess::canBeDelivered | ( | ilWACPath | $ilWACPath | ) |
Reimplemented from ilObjectAccess.
Definition at line 41 of file class.ilObjTestAccess.php.
References $DIC, findMatch(), and ilWACPath\getPath().
Here is the call graph for this function:
|
static |
check condition
this method is called by ilConditionHandler
Implements ilConditionHandling.
Definition at line 323 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(), and ilCourseStart\isFullfilled().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 56 of file class.ilObjTestAccess.php.
References $path, ILIAS\Data\Result\except(), and ILIAS\Modules\Test\SimpleAccess\isPermitted().
Referenced by canBeDelivered().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Get possible conditions operators.
Implements ilConditionHandling.
Definition at line 307 of file class.ilObjTestAccess.php.
References 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 |
@noinspection PhpParamsInspection
@noinspection PhpParamsInspection
Definition at line 415 of file class.ilObjTestAccess.php.
References $DIC, $ilDB, $lng, and ilObjectFactory\getInstanceByObjId().
Referenced by checkCondition().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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 206 of file class.ilObjTestAccess.php.
References $DIC, $ilDB, $res, ASS_MarkSchema\_getMatchingMarkFromObjId(), true, and updateTestResultCache().
Referenced by checkCondition().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprotected |
Definition at line 273 of file class.ilObjTestAccess.php.
References $DIC, $ilDB, and assQuestion\_updateTestResultCache().
Referenced by isFailed().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 768 of file class.ilObjTestAccess.php.
References ilObjectFactory\getInstanceByObjId().
Referenced by ilLOUtils\getTestResultLinkForUser(), and ilObjTestListGUI\handleUserResultsCommand().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Definition at line 406 of file class.ilObjTestAccess.php.