19declare(strict_types=1);
38 $this->request = TestDIC::dic()[
'request_data_collector'];
68 if ($this->test_object ===
null) {
71 return (
bool) $this->test_object->getAnonymity();
79 $this->test_object = $test;
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);
125 protected static function isLPMember(array &$a_res,
int $a_usr_id, array $a_obj_ids): bool
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;
const TYPE_TEST_QUALIFIED
static lookupContainerForTest(int $a_test_ref_id)
static lookupObjectivesForTest(int $a_test_ref_id)
static getInstance(int $a_container_id)
static deleteResultsFromLP(int $a_course_id, array $a_user_ids, bool $a_remove_initial, bool $a_remove_qualified, array $a_objective_ids)
const LP_MODE_DEACTIVATED
const LP_MODE_TEST_PASSED
const LP_MODE_TEST_FINISHED
static _getInstance(int $a_obj_id, ?int $a_mode=null)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
Base class for object lp connectors.
resetCustomLPDataForUserIds(array $user_ids, bool $recursive=true)
static isLPMember(array &$a_res, int $a_usr_id, array $a_obj_ids)
Find (lp-relevant) members for given object ids.
static getDefaultModes(bool $a_lp_active)
Get available type-specific default modes (no administration needed)
setTestObject(\ilObjTest $test)
RequestDataCollector $request
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc