4 include_once
"Services/Object/classes/class.ilObjectLP.php";
45 include_once
'./Modules/Test/classes/class.ilObjTest.php';
54 $this->testObj =
$test;
64 require_once
'Services/Object/classes/class.ilObjectFactory.php';
67 $testOBJ->removeTestResultsByUserIds($a_user_ids);
70 $test_ref_id = (int) $_REQUEST[
"ref_id"];
71 if ($this->testObj && $this->testObj->getRefId()) {
72 $test_ref_id = $this->testObj->getRefId();
75 require_once
"Modules/Course/classes/Objectives/class.ilLOSettings.php";
81 require_once
"Modules/Course/classes/Objectives/class.ilLOUserResults.php";
82 include_once
'./Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
86 ($lo_settings->getInitialTest() == $test_ref_id),
87 ($lo_settings->getQualifiedTest() == $test_ref_id),
92 require_once
"Services/Tracking/classes/class.ilLPStatusFactory.php";
94 if (strtolower(get_class($lp_status)) !=
"illpstatus") {
95 foreach ($a_user_ids as $user_id) {
96 $lp_status->_updateStatus($course_obj_id, $user_id);
103 protected static function isLPMember(array &$a_res, $a_usr_id, $a_obj_ids)
106 $ilDB = $DIC[
'ilDB'];
109 $set =
$ilDB->query(
"SELECT tt.obj_fi" .
110 " FROM tst_active ta" .
111 " JOIN tst_tests tt ON (ta.test_fi = tt.test_id)" .
112 " WHERE " .
$ilDB->in(
"tt.obj_fi", (array) $a_obj_ids,
false,
"integer") .
113 " AND ta.user_fi = " .
$ilDB->quote($a_usr_id,
"integer"));
115 $a_res[
$row[
"obj_fi"]] =
true;
static getInstanceByObjId($a_obj_id)
get singleton instance
static isObjectiveTest($a_trst_ref_id)
Check if test ref_id is used in an objective course.
static _getInstance($a_obj_id, $a_mode=null)
const LP_MODE_TEST_FINISHED
static _lookupAnonymity($a_obj_id)
Returns the anonymity status of a test with a given object id.
resetCustomLPDataForUserIds(array $a_user_ids, $a_recursive=true)
const LP_MODE_TEST_PASSED
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static lookupObjectivesForTest($a_test_ref_id)
Get all objectives that are assigned to given test.
setTestObject(\ilObjTest $test)
static isLPMember(array &$a_res, $a_usr_id, $a_obj_ids)
const LP_MODE_DEACTIVATED
static getDefaultModes($a_lp_active)
static deleteResultsFromLP($a_course_id, array $a_user_ids, $a_remove_initial, $a_remove_qualified, array $a_objective_ids)
Delete all (qualified) result entries for course members.