|
static | isLPMember (array &$a_res, int $a_usr_id, array $a_obj_ids) |
|
static | isLPMember (array &$res, int $usr_id, array $obj_ids) |
| Find (lp-relevant) members for given object ids. More...
|
|
static | findMembershipsByPath (array &$res, int $usr_id, int $parent_ref_id, array $obj_ids, bool $mapped_ref_ids=false) |
| Find (lp-relevant) memberships by path. More...
|
|
static | getTypeDefaultFromDB (string $type) |
|
Definition at line 31 of file class.ilTestLP.php.
◆ __construct()
ilTestLP::__construct |
( |
int |
$obj_id | ) |
|
◆ getDefaultMode()
ilTestLP::getDefaultMode |
( |
| ) |
|
◆ getDefaultModes()
static ilTestLP::getDefaultModes |
( |
bool |
$a_lp_active | ) |
|
|
static |
◆ getValidModes()
ilTestLP::getValidModes |
( |
| ) |
|
◆ isAnonymized()
ilTestLP::isAnonymized |
( |
| ) |
|
Definition at line 66 of file class.ilTestLP.php.
References ilObjectFactory\getInstanceByObjId(), null, and setTestObject().
68 if ($this->test_object ===
null) {
71 return (
bool) $this->test_object->getAnonymity();
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setTestObject(\ilObjTest $test)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
◆ isLPMember()
static ilTestLP::isLPMember |
( |
array & |
$a_res, |
|
|
int |
$a_usr_id, |
|
|
array |
$a_obj_ids |
|
) |
| |
|
staticprotected |
Definition at line 125 of file class.ilTestLP.php.
References $DIC, and $ilDB.
128 $ilDB = $DIC[
'ilDB'];
131 $set =
$ilDB->query(
"SELECT tt.obj_fi" .
132 " FROM tst_active ta" .
133 " JOIN tst_tests tt ON (ta.test_fi = tt.test_id)" .
134 " WHERE " .
$ilDB->in(
"tt.obj_fi", (array) $a_obj_ids,
false,
"integer") .
135 " AND ta.user_fi = " .
$ilDB->quote($a_usr_id,
"integer"));
136 while ($row =
$ilDB->fetchAssoc($set)) {
137 $a_res[$row[
"obj_fi"]] =
true;
◆ resetCustomLPDataForUserIds()
ilTestLP::resetCustomLPDataForUserIds |
( |
array |
$user_ids, |
|
|
bool |
$recursive = true |
|
) |
| |
|
protected |
Definition at line 82 of file class.ilTestLP.php.
References $test_object, $user_id, ilLPStatusFactory\_getInstance(), ilLOUserResults\deleteResultsFromLP(), ilLOTestAssignments\getInstance(), ilObjectFactory\getInstanceByObjId(), ilLOTestAssignments\lookupContainerForTest(), ilLOTestAssignments\lookupObjectivesForTest(), ilLOSettings\TYPE_TEST_INITIAL, and ilLOSettings\TYPE_TEST_QUALIFIED.
85 if ($this->test_object) {
91 $testOBJ->removeTestResultsByUserIds($user_ids);
94 $test_ref_id = $this->request->int(
'ref_id');
95 if ($this->test_object && $this->test_object->getRefId()) {
96 $test_ref_id = $this->test_object->getRefId();
99 if ($test_ref_id === 0) {
104 if ($course_obj_id === 0) {
118 if (strtolower(get_class($lp_status)) !==
'illpstatus') {
120 $lp_status->_updateStatus($course_obj_id, $user_id);
static deleteResultsFromLP(int $a_course_id, array $a_user_ids, bool $a_remove_initial, bool $a_remove_qualified, array $a_objective_ids)
static lookupObjectivesForTest(int $a_test_ref_id)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
static _getInstance(int $a_obj_id, ?int $a_mode=null)
static getInstance(int $a_container_id)
const TYPE_TEST_QUALIFIED
static lookupContainerForTest(int $a_test_ref_id)
◆ setTestObject()
◆ $request
◆ $test_object
The documentation for this class was generated from the following file: