function updateCondition()
 {
     global $ilObjDataCache;
     if (!$_GET['condition_id']) {
         ilUtil::sendFailure("Missing id: condition_id");
         $this->listConditions();
         return false;
     }
     // Update condition
     include_once './Services/AccessControl/classes/class.ilConditionHandler.php';
     $condition_handler = new ilConditionHandler();
     $condition = ilConditionHandler::_getCondition((int) $_GET['condition_id']);
     $condition_handler->setOperator($_POST['operator']);
     $condition_handler->setObligatory((int) $_POST['obligatory']);
     $condition_handler->setTargetRefId($this->getTargetRefId());
     $condition_handler->setValue('');
     switch ($this->getTargetType()) {
         case 'st':
             $condition_handler->setReferenceHandlingType($_POST['ref_handling']);
             break;
         default:
             $condition_handler->setReferenceHandlingType(ilConditionHandler::UNIQUE_CONDITIONS);
             break;
     }
     $condition_handler->updateCondition($condition['id']);
     // Update relevant sco's
     if ($condition['trigger_type'] == 'sahs') {
         include_once 'Services/Object/classes/class.ilObjectLP.php';
         $olp = ilObjectLP::getInstance($condition['trigger_obj_id']);
         $collection = $olp->getCollectionInstance();
         if ($collection) {
             $collection->delete();
         }
         if (is_array($_POST['item_ids'])) {
             $collection->activateEntries($_POST['item_ids']);
         }
         include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
         ilLPStatusWrapper::_refreshStatus($condition['trigger_obj_id']);
     }
     ilUtil::sendSuccess($this->lng->txt('settings_saved'));
     $this->ctrl->redirect($this, 'listConditions');
 }