|
ILIAS
Release_3_10_x_branch Revision 61812
|
Class ilObjTestAccess. More...
Inheritance diagram for ilObjTestAccess:
Collaboration diagram for ilObjTestAccess: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. | |
| _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. | |
| _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. | |
| _getQuestionCount ($test_id) | |
| Calculates the number of questions in a test. | |
| _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. | |
| & | _getPassedUsers ($a_obj_id) |
| Returns an array containing the users who passed the test. | |
| _checkGoto ($a_target) | |
| check whether goto script will succeed | |
Static Public Member Functions | |
| _hasFinished ($a_user_id, $a_obj_id) | |
| Returns information if a specific user has finished a test. | |
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 | ( | $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 56 of file class.ilObjTestAccess.php.
References $lng, _lookupCreationComplete(), and IL_NO_OBJECT_ACCESS.
Here is the call graph for this function:| 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 220 of file class.ilObjTestAccess.php.
References _hasFinished(), and _isPassed().
Referenced by ilCourseStart\isFullfilled().
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjTestAccess::_checkGoto | ( | $a_target | ) |
check whether goto script will succeed
Reimplemented from ilObjectAccess.
Definition at line 770 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 256 of file class.ilObjTestAccess.php.
Referenced by ilObjTestListGUI\init().
Here is the caller graph for this function:| ilObjTestAccess::_getMaxPointsForTestPass | ( | $random, | |
| $user_id, | |||
| $test_id, | |||
| $pass | |||
| ) |
Returns the maximum number of points available for a test 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 102 of file class.ilObjTestAccess.php.
References $pass, and $result.
Referenced by _getPassedUsers(), and _isPassed().
Here is the caller graph for this function:| ilObjTestAccess::_getParticipantData | ( | $active_id | ) |
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 $lng, $result, ilObjTest\_lookupAnonymity(), and ilObjUser\_lookupName().
Referenced by assQuestion\_setReachedPoints().
Here is the call graph for this function:
Here is the caller graph for this function:| & ilObjTestAccess::_getPassedUsers | ( | $a_obj_id | ) |
Returns an array containing the users who passed the test.
Returns an array containing the users who passed the test
Definition at line 672 of file class.ilObjTestAccess.php.
References $data, $result, $test, $user, ASS_MarkSchema\_getMatchingMarkFromObjId(), and _getMaxPointsForTestPass().
Referenced by ilLPStatusTestPassed\_getStatusInfo().
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjTestAccess::_getQuestionCount | ( | $test_id | ) |
Calculates the number of questions in a test.
Calculates the number of questions in a test
Definition at line 487 of file class.ilObjTestAccess.php.
References $result, $test, and _getTestData().
Referenced by _isComplete().
Here is the call graph for this function:
Here is the caller graph for this function:| & ilObjTestAccess::_getTestData | ( | $test_id | ) |
Returns the database content of a test with a given id.
Returns the database content of a test with a given id
| int | $test_id | Database id of the test |
Definition at line 464 of file class.ilObjTestAccess.php.
References $result, and $test.
Referenced by _getQuestionCount().
Here is the caller graph for this function:| ilObjTestAccess::_getTestIDFromObjectID | ( | $object_id | ) |
Returns the ILIAS test id for a given object id.
Returns the ILIAS test id for a given object id
| integer | $object_id | The object id |
Definition at line 328 of file class.ilObjTestAccess.php.
References $result.
Referenced by _hasFinished(), and _isComplete().
Here is the caller graph for this function:| & ilObjTestAccess::_getTestQuestions | ( | $active_id, | |
$pass = NULL |
|||
| ) |
Definition at line 344 of file class.ilObjTestAccess.php.
References $pass, and $result.
|
static |
Returns information if a specific user has finished a test.
| integer | $user_id | Database id of the user |
| integer | test obj_id |
Definition at line 306 of file class.ilObjTestAccess.php.
References $res, and _getTestIDFromObjectID().
Referenced by _checkCondition().
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjTestAccess::_isComplete | ( | $a_obj_id | ) |
Returns true, if a test is complete for use.
Returns true, if a test is complete for use
Definition at line 406 of file class.ilObjTestAccess.php.
References $result, $test, _getQuestionCount(), and _getTestIDFromObjectID().
Here is the call graph for this function:| ilObjTestAccess::_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.
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 144 of file class.ilObjTestAccess.php.
References $data, $result, $test, $user, ASS_MarkSchema\_getMatchingMarkFromObjId(), and _getMaxPointsForTestPass().
Referenced by _checkCondition().
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjTestAccess::_lookupCreationComplete | ( | $a_obj_id | ) |
checks wether all necessary parts of the test are given
Definition at line 276 of file class.ilObjTestAccess.php.
References $result.
Referenced by _checkAccess(), and ilObjTestListGUI\getProperties().
Here is the caller graph for this function:| ilObjTestAccess::_lookupOnlineTestAccess | ( | $a_test_id, | |
| $a_user_id | |||
| ) |
Checks if a user is allowd to run an online exam.
Checks if a user is allowd to run an online exam
Definition at line 533 of file class.ilObjTestAccess.php.
Referenced by ilObjTestListGUI\getProperties(), and ilObjTestGUI\infoScreen().
Here is the caller graph for this function: