3 declare(strict_types=1);
111 protected string $operator =
'';
123 $this->db = $DIC->database();
124 $this->
lng = $DIC->language();
125 $this->objDefinition = $DIC[
'objDefinition'];
126 $this->tree = $DIC->repositoryTree();
127 $this->
logger = $DIC->logger()->ac();
128 $this->validation =
true;
133 self::$cond_for_target_cache = [];
134 self::$cond_target_rows = [];
142 return $a_type ===
'st';
148 public static function lookupEffectiveHiddenStatusByTarget(
int $a_target_ref_id):
bool 152 $obj_definition = $DIC[
'objDefinition'];
153 $tree = $DIC->repositoryTree();
156 $parent_ref_id = $tree->
getParentId($a_target_ref_id);
160 $class = $obj_definition->getClassName($parent_type);
161 $class_name =
"il" . $class .
"ConditionController";
162 $location = $obj_definition->getLocation($parent_type);
165 if ($class !==
"" && is_file(
$location .
"/class." . $class_name .
".php")) {
167 $controller =
new $class_name();
168 if ($controller->isContainerConditionController($parent_ref_id)) {
169 return (
bool) $controller->getConditionSetForRepositoryObject($a_target_ref_id)->getHiddenStatus();
172 return self::lookupPersistedHiddenStatusByTarget($a_target_ref_id);
179 $ilDB = $DIC->database();
181 $query =
'SELECT hidden_status FROM conditions ' .
182 'WHERE target_ref_id = ' .
$ilDB->quote($a_target_ref_id,
'integer');
185 return (
bool) $row->hidden_status;
208 $ilDB = $DIC[
'ilDB'];
210 $query =
"SELECT DISTINCT target_ref_id ref FROM conditions ";
214 $ref_ids[] = (
int) $row->ref;
228 $ilDB = $DIC[
'ilDB'];
230 $query =
"DELETE FROM conditions " .
231 "WHERE target_ref_id = " .
$ilDB->quote($a_target_ref_id,
'integer') .
" " .
232 "AND target_type != 'st' ";
239 $this->condition_reference_type = $a_type;
249 $this->error_message = $a_msg;
259 $this->target_ref_id = $a_target_ref_id;
269 $this->target_obj_id = $a_target_obj_id;
282 $this->target_type = $a_target_type;
295 $this->trigger_ref_id = $a_trigger_ref_id;
305 $this->trigger_obj_id = $a_trigger_obj_id;
318 $this->trigger_type = $a_trigger_type;
331 $this->
operator = $a_operator;
336 return $this->operator;
341 $this->value = $a_value;
354 $this->obligatory = $a_obl;
367 $this->hidden_status = $a_status;
377 $this->validation = $a_validate;
382 $trigger_types = array(
'crs',
'exc',
'tst',
'sahs',
'svy',
'lm',
'iass',
'prg',
'copa',
'lti',
'cmix');
387 foreach ($this->objDefinition->getAllRepositoryTypes() as $t) {
389 $trigger_types[] = $t;
393 foreach ($this->objDefinition->getPlugins() as $p_type => $p_info) {
395 $name =
'ilObj' . $p_info[
'class_name'] .
'Access';
397 if ($reflection->implementsInterface(
'ilConditionHandling')) {
398 $trigger_types[] = $p_type;
401 $this->
logger->warning(
'Cannot create instance for ' .
$name);
402 $this->
logger->warning($e->getMessage());
405 $active_triggers = array();
406 foreach ($trigger_types as
$type) {
408 $active_triggers[] =
$type;
411 return $active_triggers;
421 $objDefinition = $DIC[
'objDefinition'];
423 if ($a_type ===
'crsg') {
424 return [
'not_member'];
429 $full_class =
"ilObj" . $class .
"Access";
430 include_once(
$location .
"/class." . $full_class .
".php");
432 if ($reflection->implementsInterface(
'ilConditionHandling')) {
433 $operators = call_user_func(
434 array($full_class,
'getConditionOperators'),
446 array_unshift($operators, self::OPERATOR_LP);
458 $next_id = $this->db->nextId(
'conditions');
459 $query =
'INSERT INTO conditions (condition_id,target_ref_id,target_obj_id,target_type,' .
460 'trigger_ref_id,trigger_obj_id,trigger_type,operator,value,ref_handling,obligatory,hidden_status) ' .
462 $this->db->quote($next_id,
'integer') .
',' .
469 $this->db->quote($this->
getOperator(),
'text') .
"," .
470 $this->db->quote($this->
getValue(),
'text') .
", " .
478 if ($this->validation && !$this->
validate()) {
487 $query =
"SELECT * FROM conditions " .
488 "WHERE target_ref_id = " . $this->db->quote($this->
getTargetRefId(),
'integer') .
" " .
489 "AND target_obj_id = " . $this->db->quote($this->
getTargetObjId(),
'integer') .
" " .
490 "AND trigger_ref_id = " . $this->db->quote($this->
getTriggerRefId(),
'integer') .
" " .
491 "AND trigger_obj_id = " . $this->db->quote($this->
getTriggerObjId(),
'integer') .
" " .
492 "AND operator = " . $this->db->quote($this->
getOperator(),
'text');
494 return (
bool)
$res->numRows();
499 $query =
"UPDATE conditions SET " .
500 "target_ref_id = " . $this->db->quote($this->
getTargetRefId(),
'integer') .
", " .
501 "operator = " . $this->db->quote($this->
getOperator(),
'text') .
", " .
502 "value = " . $this->db->quote($this->
getValue(),
'text') .
", " .
504 'obligatory = ' . $this->db->quote($this->
getObligatory(),
'integer') .
' ' .
505 "WHERE condition_id = " . $this->db->quote($a_id,
'integer');
511 $query =
'UPDATE conditions SET ' .
512 'hidden_status = ' . $this->db->quote($a_status,
'integer') .
' ' .
513 'WHERE target_ref_id = ' . $this->db->quote($this->
getTargetRefId(),
'integer');
514 $this->db->manipulate(
$query);
524 $ilDB = $DIC->database();
525 $query =
"UPDATE conditions SET " .
526 'obligatory = ' .
$ilDB->quote($a_status,
'integer') .
' ' .
527 "WHERE condition_id = " .
$ilDB->quote($a_id,
'integer');
535 public function delete(
int $a_ref_id):
void 537 $query =
"DELETE FROM conditions WHERE " .
538 "target_ref_id = " . $this->db->quote($a_ref_id,
'integer') .
" " .
539 "OR trigger_ref_id = " . $this->db->quote($a_ref_id,
'integer');
549 $query =
"DELETE FROM conditions WHERE " .
550 "target_obj_id = " . $this->db->quote($a_obj_id,
'integer') .
" " .
551 "OR trigger_obj_id = " . $this->db->quote($a_obj_id,
'integer');
557 $query =
"DELETE FROM conditions " .
558 "WHERE condition_id = " . $this->db->quote($a_id,
'integer');
568 $db = $DIC->database();
570 $query =
'select count(*) num from conditions ' .
575 return (
int) $row->num;
587 $ilDB = $DIC[
'ilDB'];
589 $query =
"SELECT * FROM conditions " .
590 "WHERE trigger_obj_id = " .
$ilDB->quote($a_trigger_id,
'integer') .
" " .
591 " AND trigger_type = " .
$ilDB->quote($a_trigger_obj_type,
'text');
597 $tmp_array[
'id'] = (
int) $row->condition_id;
598 $tmp_array[
'target_ref_id'] = (
int) $row->target_ref_id;
599 $tmp_array[
'target_obj_id'] = (
int) $row->target_obj_id;
600 $tmp_array[
'target_type'] = (
string) $row->target_type;
601 $tmp_array[
'trigger_ref_id'] = (
int) $row->trigger_ref_id;
602 $tmp_array[
'trigger_obj_id'] = (
int) $row->trigger_obj_id;
603 $tmp_array[
'trigger_type'] = (string) $row->trigger_type;
604 $tmp_array[
'operator'] = (
string) $row->operator;
605 $tmp_array[
'value'] = (string) $row->value;
606 $tmp_array[
'ref_handling'] = (
int) $row->ref_handling;
607 $tmp_array[
'obligatory'] = (bool) $row->obligatory;
608 $tmp_array[
'hidden_status'] = (
bool) $row->hidden_status;
609 $conditions[] = $tmp_array;
619 public static function _getEffectiveConditionsOfTarget(
620 int $a_target_ref_id,
621 int $a_target_obj_id,
622 string $a_target_type =
"" 626 if ($a_target_ref_id === 0) {
630 $obj_definition = $DIC[
"objDefinition"];
631 $tree = $DIC->repositoryTree();
634 if ($a_target_type ===
"") {
639 $parent_ref_id = $tree->
getParentId($a_target_ref_id);
643 $class = $obj_definition->getClassName($parent_type);
644 $class_name =
"il" . $class .
"ConditionController";
645 $location = $obj_definition->getLocation($parent_type);
648 if ($class !==
"" && is_file(
$location .
"/class." . $class_name .
".php")
651 $controller =
new $class_name();
652 if ($controller->isContainerConditionController($parent_ref_id)) {
654 $set = $controller->getConditionSetForRepositoryObject($a_target_ref_id);
658 foreach ($set->getConditions() as
$c) {
659 $obligatory = $set->getAllObligatory() ||
$c->getObligatory();
660 $trigger =
$c->getTrigger();
662 "target_ref_id" => $a_target_ref_id,
663 "target_obj_id" => $a_target_obj_id,
664 "target_type" => $a_target_type,
665 "trigger_ref_id" => $trigger->getRefId(),
666 "trigger_obj_id" => $trigger->getObjId(),
667 "trigger_type" => $trigger->getType(),
668 "operator" =>
$c->getOperator(),
669 "value" =>
$c->getValue(),
672 "num_obligatory" => $set->getNumObligatory(),
673 "hidden_status" => $set->getHiddenStatus()
680 return self::_getPersistedConditionsOfTarget($a_target_ref_id, $a_target_obj_id, $a_target_type);
688 int $a_target_ref_id,
689 int $a_target_obj_id,
690 string $a_target_type =
"" 694 $ilDB = $DIC[
'ilDB'];
697 if ($a_target_type ===
"") {
702 if (isset(self::$cond_for_target_cache[$a_target_ref_id .
":" . $a_target_obj_id .
":" .
704 return self::$cond_for_target_cache[$a_target_ref_id .
":" . $a_target_obj_id .
":" .
709 if (isset(self::$cond_target_rows[$a_target_type .
":" . $a_target_obj_id])) {
710 $rows = self::$cond_target_rows[$a_target_type .
":" . $a_target_obj_id];
713 $query =
"SELECT * FROM conditions " .
714 "WHERE target_obj_id = " .
$ilDB->quote($a_target_obj_id,
'integer') .
" " .
715 " AND target_type = " .
$ilDB->quote($a_target_type,
'text');
721 $item[
'condition_id'] = (
int) $row[
'condition_id'];
722 $item[
'target_ref_id'] = (
int) $row[
'target_ref_id'];
723 $item[
'target_obj_id'] = (
int) $row[
'target_obj_id'];
724 $item[
'trigger_ref_id'] = (
int) $row[
'trigger_ref_id'];
725 $item[
'trigger_obj_id'] = (
int) $row[
'trigger_obj_id'];
726 $item[
'target_type'] = (string) $row[
'target_type'];
727 $item[
'trigger_type'] = (string) $row[
'trigger_type'];
728 $item[
'operator'] = (string) $row[
'operator'];
729 $item[
'value'] = (string) $row[
'value'];
730 $item[
'ref_handling'] = (
int) $row[
'ref_handling'];
731 $item[
'obligatory'] = (bool) $row[
'obligatory'];
732 $item[
'num_obligatory'] = (
int) $row[
'num_obligatory'];
733 $item[
'hidden_status'] = (bool) $row[
'hidden_status'];
741 foreach (
$rows as $row) {
742 if (($row[
"ref_handling"] == self::UNIQUE_CONDITIONS) && $row[
"target_ref_id"] != $a_target_ref_id) {
746 $row[
"id"] = $row[
"condition_id"];
747 $conditions[] = $row;
750 self::$cond_for_target_cache[$a_target_ref_id .
":" . $a_target_obj_id .
":" .
751 $a_target_type] = $conditions;
762 $ilDB = $DIC[
'ilDB'];
764 if (is_array($a_obj_ids) && count($a_obj_ids) > 0) {
765 $res =
$ilDB->query(
"SELECT * FROM conditions " .
766 "WHERE " .
$ilDB->in(
"target_obj_id", $a_obj_ids,
false,
"integer") .
767 " AND target_type = " .
$ilDB->quote($a_type,
'text'));
771 $item[
'condition_id'] = (
int) $row[
'condition_id'];
772 $item[
'target_ref_id'] = (
int) $row[
'target_ref_id'];
773 $item[
'target_obj_id'] = (
int) $row[
'target_obj_id'];
774 $item[
'trigger_ref_id'] = (
int) $row[
'trigger_ref_id'];
775 $item[
'trigger_obj_id'] = (
int) $row[
'trigger_obj_id'];
776 $item[
'target_type'] = (string) $row[
'target_type'];
777 $item[
'trigger_type'] = (string) $row[
'trigger_type'];
778 $item[
'operator'] = (string) $row[
'operator'];
779 $item[
'value'] = (string) $row[
'value'];
780 $item[
'ref_handling'] = (
int) $row[
'ref_handling'];
781 $item[
'obligatory'] = (bool) $row[
'obligatory'];
782 $item[
'num_obligatory'] = (
int) $row[
'num_obligatory'];
783 $item[
'hidden_status'] = (bool) $row[
'hidden_status'];
784 self::$cond_target_rows[$a_type .
":" . $row[
"target_obj_id"]][] = $item;
787 foreach ($a_obj_ids as $obj_id) {
788 if (!isset(self::$cond_target_rows[$a_type .
":" . $obj_id])) {
789 self::$cond_target_rows[$a_type .
":" . $obj_id] = array();
799 $ilDB = $DIC[
'ilDB'];
801 $query =
"SELECT * FROM conditions " .
802 "WHERE condition_id = " .
$ilDB->quote($a_id,
'integer');
806 $tmp_array[
'id'] = (
int) $row->condition_id;
807 $tmp_array[
'target_ref_id'] = (
int) $row->target_ref_id;
808 $tmp_array[
'target_obj_id'] = (
int) $row->target_obj_id;
809 $tmp_array[
'target_type'] = (
string) $row->target_type;
810 $tmp_array[
'trigger_ref_id'] = (
int) $row->trigger_ref_id;
811 $tmp_array[
'trigger_obj_id'] = (
int) $row->trigger_obj_id;
812 $tmp_array[
'trigger_type'] = (string) $row->trigger_type;
813 $tmp_array[
'operator'] = (
string) $row->operator;
814 $tmp_array[
'value'] = (string) $row->value;
815 $tmp_array[
'ref_handling'] = (
int) $row->ref_handling;
816 $tmp_array[
'obligatory'] = (bool) $row->obligatory;
817 $tmp_array[
'hidden_status'] = (
bool) $row->hidden_status;
818 $tmp_array[
'num_obligatory'] = (
int) $row->num_obligatory;
834 $objDefinition = $DIC[
'objDefinition'];
835 $a_usr_id = $a_usr_id ?:
$ilUser->getId();
838 if ($condition[
'operator'] === self::OPERATOR_LP) {
841 switch ($condition[
'trigger_type']) {
844 (
int) $condition[
'trigger_obj_id'],
845 (
string) $condition[
'operator'],
846 (
string) $condition[
'value'],
850 $class = $objDefinition->
getClassName($condition[
'trigger_type']);
852 $full_class =
"ilObj" . $class .
"Access";
853 include_once(
$location .
"/class." . $full_class .
".php");
855 if (!(is_a($full_class,
"ilConditionHandling",
true))) {
859 $fullfilled = call_user_func(
860 array($full_class,
'checkCondition'),
861 (
int) $condition[
'trigger_obj_id'],
862 (
string) $condition[
'operator'],
863 (
string) $condition[
'value'],
870 int $a_target_ref_id,
871 int $a_target_obj_id,
872 string $a_obj_type =
'' 874 $conditions = self::_getEffectiveConditionsOfTarget($a_target_ref_id, $a_target_obj_id);
877 foreach ($conditions as $con) {
878 if ($con[
'obligatory']) {
887 int $a_target_ref_id,
888 int $a_target_obj_id,
889 string $a_obj_type =
'' 891 $conditions = self::_getPersistedConditionsOfTarget($a_target_ref_id, $a_target_obj_id);
894 foreach ($conditions as $con) {
895 if ($con[
'obligatory']) {
907 $ilDB = $DIC[
'ilDB'];
909 $query =
'SELECT max(num_obligatory) obl from conditions WHERE ' .
910 'target_ref_id = ' .
$ilDB->quote($a_target_ref_id,
'integer') .
' ' .
911 'AND target_obj_id = ' .
$ilDB->quote($a_target_obj_id,
'integer') .
' ' .
912 'GROUP BY (num_obligatory)';
917 $obl = (
int) $row->obl;
923 int $a_target_ref_id,
924 int $a_target_obj_id,
925 string $a_target_obj_type =
'' 929 $ilDB = $DIC[
'ilDB'];
932 $all = self::_getEffectiveConditionsOfTarget($a_target_ref_id, $a_target_obj_id, $a_target_obj_type);
933 $opt = self::getEffectiveOptionalConditionsOfTarget($a_target_ref_id, $a_target_obj_id, $a_target_obj_type);
936 if (isset($all[0])) {
937 $set_obl = $all[0][
'num_obligatory'];
942 $set_obl < count($all) &&
943 $set_obl > (count($all) - count($opt) + 1)) {
948 $result = count($all) - count($opt) + 1;
950 $result = count($all);
956 int $a_target_ref_id,
957 int $a_target_obj_id,
958 string $a_target_obj_type =
'',
959 bool $a_force_update =
false 963 $ilDB = $DIC[
'ilDB'];
968 $all = self::_getPersistedConditionsOfTarget($a_target_ref_id, $a_target_obj_id, $a_target_obj_type);
969 $opt = self::getPersistedOptionalConditionsOfTarget($a_target_ref_id, $a_target_obj_id, $a_target_obj_type);
972 if (isset($all[0])) {
973 $set_obl = $all[0][
'num_obligatory'];
978 $set_obl < count($all) &&
979 $set_obl > (count($all) - count($opt) + 1)) {
984 $result = count($all) - count($opt) + 1;
986 $result = count($all);
988 if ($a_force_update) {
989 self::saveNumberOfRequiredTriggers($a_target_ref_id, $a_target_obj_id, $result);
998 $ilDB = $DIC[
'ilDB'];
1000 $query =
'UPDATE conditions ' .
1001 'SET num_obligatory = ' .
$ilDB->quote($a_num,
'integer') .
' ' .
1002 'WHERE target_ref_id = ' .
$ilDB->quote($a_target_ref_id,
'integer') .
' ' .
1003 'AND target_obj_id = ' .
$ilDB->quote($a_target_obj_id,
'integer');
1012 int $a_target_ref_id,
1014 string $a_target_type =
"",
1020 $tree = $DIC[
'tree'];
1021 $logger = $DIC->logger()->ac();
1023 $a_usr_id = $a_usr_id ?:
$ilUser->getId();
1024 $conditions = self::_getEffectiveConditionsOfTarget(
1029 if (!count($conditions)) {
1038 $optional = self::getEffectiveOptionalConditionsOfTarget($a_target_ref_id, $a_target_id, $a_target_type);
1039 $num_required = self::calculateEffectiveRequiredTriggers($a_target_ref_id, $a_target_id, $a_target_type);
1041 foreach ($conditions as $condition) {
1042 if ($tree->
isDeleted($condition[
'trigger_ref_id'])) {
1045 $check = self::_checkCondition($condition, $a_usr_id);
1051 if ($condition[
'obligatory']) {
1056 return $passed >= $num_required;
1066 if ($trigger_obj !== null && $target_obj !== null) {
1067 $query =
"SELECT * FROM conditions WHERE " .
1068 "trigger_ref_id = " . $this->db->quote($trigger_obj->getRefId(),
'integer') .
" " .
1069 "AND target_ref_id = " . $this->db->quote($target_obj->getRefId(),
'integer');
1073 if (
$res->numRows() > 1) {
1076 unset($trigger_obj, $target_obj);
1080 $this->target_obj_id = $target_obj->getId();
1085 unset($trigger_obj, $target_obj);
1095 foreach (self::_getPersistedConditionsOfTarget($a_ref_id, $a_obj_id) as $condition) {
1096 if ($condition[
'trigger_obj_id'] == $this->target_obj_id && $condition[
'operator'] === $this->
getOperator()) {
1097 $this->circle =
true;
1101 $this->
checkCircle($condition[
'trigger_ref_id'], $condition[
'trigger_obj_id']);
1106 public static function cloneDependencies(
int $a_src_ref_id,
int $a_target_ref_id,
int $a_copy_id): void
1109 $mappings = $cwo->getMappings();
1112 $conditions = self::_getPersistedConditionsOfTarget(
1116 foreach ($conditions as $con) {
1117 if ($mappings[$con[
'trigger_ref_id']] ??
false) {
1123 $newCondition->setTargetRefId($a_target_ref_id);
1124 $newCondition->setTargetObjId($target_obj);
1125 $newCondition->setTargetType($target_typ);
1127 $trigger_ref = $mappings[$con[
'trigger_ref_id']];
1131 $newCondition->setTriggerRefId($trigger_ref);
1132 $newCondition->setTriggerObjId($trigger_obj);
1133 $newCondition->setTriggerType($trigger_typ);
1134 $newCondition->setOperator($con[
'operator']);
1135 $newCondition->setValue($con[
'value']);
1136 $newCondition->setReferenceHandlingType($con[
'ref_handling']);
1137 $newCondition->setObligatory($con[
'obligatory']);
1140 $newCondition->setHiddenStatus(self::lookupPersistedHiddenStatusByTarget($a_src_ref_id));
1142 if ($newCondition->storeCondition()) {
1146 self::saveNumberOfRequiredTriggers(
1149 $con[
'num_obligatory']
1158 self::calculatePersistedRequiredTriggers(
static array $cond_for_target_cache
enableAutomaticValidation(bool $a_validate=true)
static _hasUserCompleted(int $a_obj_id, int $a_user_id)
Lookup user object completion.
storeCondition()
store new condition in database
static _getCondition(int $a_id)
updateHiddenStatus(bool $a_status)
static isSupportedObjectType(string $type)
getOperatorsByTriggerType(string $a_type)
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setReferenceHandlingType(int $a_type)
static _isReferenceHandlingOptional(string $a_type)
static cloneDependencies(int $a_src_ref_id, int $a_target_ref_id, int $a_copy_id)
static _checkCondition(int $trigger_obj_id, string $operator, $value, int $a_usr_id=0)
setOperator(string $a_operator)
static lookupObligatoryConditionsOfTarget(int $a_target_ref_id, int $a_target_obj_id)
isDeleted(int $a_node_id)
This is a wrapper for isSaved() with a more useful name.
deleteByObjId(int $a_obj_id)
delete all trigger and target entries This method is called from ilObject::delete() if an object is r...
deleteCondition(int $a_id)
static updateObligatory(int $a_id, bool $a_status)
Toggle condition obligatory status.
static calculatePersistedRequiredTriggers(int $a_target_ref_id, int $a_target_obj_id, string $a_target_obj_type='', bool $a_force_update=false)
setTargetRefId(int $a_target_ref_id)
int $condition_reference_type
getObligatory()
Get obligatory status.
quote($value, string $type)
setTriggerObjId(int $a_trigger_obj_id)
checkCircle(int $a_ref_id, int $a_obj_id)
static lookupPersistedHiddenStatusByTarget(int $a_target_ref_id)
getReferenceHandlingType()
setTriggerType(string $a_trigger_type)
set trigger object type
static _lookupObjId(int $ref_id)
static saveNumberOfRequiredTriggers(int $a_target_ref_id, int $a_target_obj_id, int $a_num)
static getNumberOfConditionsOfTrigger(string $a_trigger_obj_type, int $a_trigger_id)
get all conditions of trigger object
parses the objects.xml it handles the xml-description of all ilias objects
static _enabledLearningProgress()
setTriggerRefId(int $a_trigger_ref_id)
static _checkCondition(array $condition, int $a_usr_id=0)
checks wether a single condition is fulfilled every trigger object type must implement a static metho...
static calculateEffectiveRequiredTriggers(int $a_target_ref_id, int $a_target_obj_id, string $a_target_obj_type='')
setTargetObjId(int $a_target_obj_id)
updateCondition(int $a_id)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
getClassName(string $obj_name)
setHiddenStatus(bool $a_status)
static preloadPersistedConditionsForTargetRecords(string $a_type, array $a_obj_ids)
static _getDistinctTargetRefIds()
static _adjustMovedObjectConditions(int $a_ref_id)
In the moment it is not allowed to create preconditions on objects that are located outside of a cour...
query(string $query)
Run a (read-only) Query on the database.
static _getPersistedConditionsOfTrigger(string $a_trigger_obj_type, int $a_trigger_id)
Get all persisted conditions of trigger object Note: This only gets persisted conditions NOT (dynamic...
static _deleteTargetConditionsByRefId(int $a_target_ref_id)
Delete conditions by target ref id Note: only conditions on the target type are deleted Conditions on...
getParentId(int $a_node_id)
get parent id of given node
const OPERATOR_ACCREDITED_OR_PASSED
setObligatory(bool $a_obl)
Set obligatory status.
const OPERATOR_NOT_FINISHED
setValue(string $a_value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getTriggerType()
get trigger obj type
static array $cond_target_rows
static _checkAllConditionsOfTarget(int $a_target_ref_id, int $a_target_id, string $a_target_type="", int $a_usr_id=0)
checks wether all conditions of a target object are fulfilled
setTargetType(string $a_target_type)
set target object type
static getPersistedOptionalConditionsOfTarget(int $a_target_ref_id, int $a_target_obj_id, string $a_obj_type='')
static getEffectiveOptionalConditionsOfTarget(int $a_target_ref_id, int $a_target_obj_id, string $a_obj_type='')
setErrorMessage(string $a_msg)
static _getInstance(int $a_copy_id)
getLocation(string $obj_name)
ilObjectDefinition $objDefinition
static _lookupType(int $id, bool $reference=false)
const OPERATOR_NOT_MEMBER
static _getPersistedConditionsOfTarget(int $a_target_ref_id, int $a_target_obj_id, string $a_target_type="")
get all persisted conditions of target object
getTargetType()
get target obj type