/** * Deletes the selected user data for the test object * * Deletes the selected user data for the test object * * @access public */ function confirmDeleteSelectedUserDataObject() { global $ilDB, $lng; require_once 'Modules/Test/classes/class.ilTestParticipantData.php'; $participantData = new ilTestParticipantData($ilDB, $lng); if ($this->object->getFixedParticipants()) { $participantData->setUserIds($_POST["chbUser"]); } else { $participantData->setActiveIds($_POST["chbUser"]); } $participantData->load($this->object->getTestId()); /* @var ilTestLP $testLP */ require_once 'Services/Object/classes/class.ilObjectLP.php'; $testLP = ilObjectLP::getInstance($this->object->getId()); $testLP->resetLPDataForUserIds($participantData->getUserIds(), false); $this->object->removeTestActives($participantData->getActiveIds()); #$this->object->removeSelectedTestResults($active_ids); // Update lp status #include_once './Services/Tracking/classes/class.ilLPStatusWrapper.php'; #ilLPStatusWrapper::_refreshStatus($this->object->getId()); ilUtil::sendSuccess($this->lng->txt("tst_selected_user_data_deleted"), true); $this->ctrl->redirect($this, "participants"); }
/** * Deletes the selected user data for the test object * * Deletes the selected user data for the test object * * @access public */ function confirmDeleteSelectedUserDataObject() { global $ilDB, $lng; require_once 'Modules/Test/classes/class.ilTestParticipantData.php'; $participantData = new ilTestParticipantData($ilDB, $lng); if ($this->object->getFixedParticipants()) { $participantData->setUserIds($_POST["chbUser"]); } else { $participantData->setActiveIds($_POST["chbUser"]); } $participantData->load($this->object->getTestId()); $this->object->removeTestResults($participantData); ilUtil::sendSuccess($this->lng->txt("tst_selected_user_data_deleted"), true); $this->ctrl->redirect($this, "participants"); }