ILIAS
Release_4_4_x_branch Revision 61816
|
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) | |
_getMaxPointsForTestPass ($random, $user_id, $test_id, $pass) | |
Returns the maximum number of points available for a test pass. | |
_checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id=0) | |
check condition | |
_getCommands () | |
get commands | |
_lookupCreationComplete ($a_obj_id) | |
checks wether all necessary parts of the test are given | |
_getTestIDFromObjectID ($object_id) | |
Returns the ILIAS test id for a given object id. | |
& | _getTestQuestions ($active_id, $pass=NULL) |
_isComplete ($a_obj_id) | |
Returns true, if a test is complete for use. | |
& | _getTestData ($test_id) |
Returns the database content of a test with a given id. | |
_lookupObjIdForTestId ($a_test_id) | |
Lookup object id for test id. | |
_getRandomTestsForQuestionPool ($qpl_id) | |
Get all tests using a question pool for random selection. | |
_lookupOnlineTestAccess ($a_test_id, $a_user_id) | |
Checks if a user is allowd to run an online exam. | |
_getParticipantData ($active_id) | |
Retrieves a participant name from active id. | |
_getParticipantId ($active_id) | |
Get user id for active id. | |
& | _getPassedUsers ($a_obj_id) |
Returns an array containing the users who passed the test. | |
_checkGoto ($a_target) | |
check whether goto script will succeed | |
Public Member Functions inherited from ilObjectAccess | |
_preloadData ($a_obj_ids, $a_ref_ids) | |
Preload data. |
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. | |
static | hasFinished ($a_user_id, $a_obj_id) |
Returns (request cached) information if a specific user has finished at least one test pass. | |
static | _isOffline ($a_obj_id) |
returns the objects's OFFline status | |
static | _isOnline ($a_obj_id) |
returns the objects's ONline status |
Static Private Attributes | |
static | $hasFinishedCache = array() |
Class ilObjTestAccess.
This class contains methods that check object specific conditions for accessing test objects.
Definition at line 19 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) |
Reimplemented from ilObjectAccess.
Definition at line 36 of file class.ilObjTestAccess.php.
References $ilUser, $lng, _lookupCreationComplete(), and IL_NO_OBJECT_ACCESS.
ilObjTestAccess::_checkCondition | ( | $a_obj_id, | |
$a_operator, | |||
$a_value, | |||
$a_usr_id = 0 |
|||
) |
check condition
this method is called by ilConditionHandler
Reimplemented from ilObjectAccess.
Definition at line 228 of file class.ilObjTestAccess.php.
References $ilUser, _isPassed(), and hasFinished().
Referenced by ilCourseStart\isFullfilled().
ilObjTestAccess::_checkGoto | ( | $a_target | ) |
check whether goto script will succeed
Reimplemented from ilObjectAccess.
Definition at line 743 of file class.ilObjTestAccess.php.
ilObjTestAccess::_getCommands | ( | ) |
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 264 of file class.ilObjTestAccess.php.
Referenced by ilObjTestListGUI\init().
ilObjTestAccess::_getMaxPointsForTestPass | ( | $random, | |
$user_id, | |||
$test_id, | |||
$pass | |||
) |
Returns the maximum number of points available for a test pass.
boolean | $random | TRUE if the test is a random test, otherwise FALSE |
int | $test_id | The test id |
int | $pass | The test pass |
Definition at line 91 of file class.ilObjTestAccess.php.
References $pass, $result, and $row.
ilObjTestAccess::_getParticipantData | ( | $active_id | ) |
Retrieves a participant name from active id.
integer | $active_id | Active ID of the participant |
Definition at line 590 of file class.ilObjTestAccess.php.
References $lng, $result, $row, ilObjTest\_lookupAnonymity(), and ilObjUser\_lookupName().
Referenced by assQuestion\_setReachedPoints(), ilTestResultsToXML\exportActiveIDs(), and ilObjTestGUI\participantsObject().
ilObjTestAccess::_getParticipantId | ( | $active_id | ) |
Get user id for active id.
int | active ID of the participant |
Definition at line 649 of file class.ilObjTestAccess.php.
References $lng, $result, and $row.
Referenced by assFileUpload\handleSubmission(), ilTestSession\increaseTestPass(), ilTestScoringGUI\saveManScoringParticipantScreen(), ilTestSessionDynamicQuestionSet\saveToDb(), and ilTestSession\saveToDb().
& ilObjTestAccess::_getPassedUsers | ( | $a_obj_id | ) |
Returns an array containing the users who passed the test.
Definition at line 676 of file class.ilObjTestAccess.php.
References $result, $row, and assQuestion\_updateTestResultCache().
Referenced by ilLPStatusTestPassed\_getStatusInfo().
ilObjTestAccess::_getRandomTestsForQuestionPool | ( | $qpl_id | ) |
Get all tests using a question pool for random selection.
int | question pool id |
Definition at line 498 of file class.ilObjTestAccess.php.
References $query, $result, $row, and $tests.
Referenced by ilWebAccessChecker\checkAccessTestQuestion().
& ilObjTestAccess::_getTestData | ( | $test_id | ) |
Returns the database content of a test with a given id.
int | $test_id | Database id of the test |
Definition at line 458 of file class.ilObjTestAccess.php.
References $result.
ilObjTestAccess::_getTestIDFromObjectID | ( | $object_id | ) |
Returns the ILIAS test id for a given object id.
integer | $object_id | The object id |
Definition at line 354 of file class.ilObjTestAccess.php.
Referenced by ilLPStatusTestFinished\getParticipants().
& ilObjTestAccess::_getTestQuestions | ( | $active_id, | |
$pass = NULL |
|||
) |
Definition at line 370 of file class.ilObjTestAccess.php.
References $pass, $result, and $row.
ilObjTestAccess::_isComplete | ( | $a_obj_id | ) |
Returns true, if a test is complete for use.
Definition at line 429 of file class.ilObjTestAccess.php.
References $query, $res, and $row.
|
static |
returns the objects's OFFline status
Used in ListGUI and Learning Progress
int | $a_obj_id |
Reimplemented from ilObjectAccess.
Definition at line 769 of file class.ilObjTestAccess.php.
References _isOnline().
|
static |
returns the objects's ONline status
integer | $a_obj_id |
Definition at line 783 of file class.ilObjTestAccess.php.
References $query, and $result.
Referenced by _isOffline(), 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 129 of file class.ilObjTestAccess.php.
References $pass, $res, $result, $row, ASS_MarkSchema\_getMatchingMarkFromObjId(), and assQuestion\_updateTestResultCache().
Referenced by _checkCondition(), and ilLPStatusTestPassed\determineStatus().
ilObjTestAccess::_lookupCreationComplete | ( | $a_obj_id | ) |
checks wether all necessary parts of the test are given
Definition at line 286 of file class.ilObjTestAccess.php.
Referenced by _checkAccess().
ilObjTestAccess::_lookupObjIdForTestId | ( | $a_test_id | ) |
Lookup object id for test id.
int | test id |
Definition at line 478 of file class.ilObjTestAccess.php.
Referenced by ilTestSession\increaseTestPass(), ilTestSessionDynamicQuestionSet\saveToDb(), and ilTestSession\saveToDb().
ilObjTestAccess::_lookupOnlineTestAccess | ( | $a_test_id, | |
$a_user_id | |||
) |
Checks if a user is allowd to run an online exam.
Definition at line 528 of file class.ilObjTestAccess.php.
References $lng, $result, and $row.
Referenced by ilObjTestGUI\buildPageViewToolbar(), ilObjTestListGUI\getProperties(), and ilObjTestGUI\questionsObject().
|
static |
Returns (request cached) information if a specific user has finished at least one test pass.
integer | $user_id | obj_id of the user |
integer | $a_obj_id | obj_id of the test |
Definition at line 316 of file class.ilObjTestAccess.php.
References $lng, and ilObjectFactory\getInstanceByObjId().
Referenced by _checkCondition().
|
staticprivate |
Definition at line 307 of file class.ilObjTestAccess.php.