3 declare(strict_types=1);
35 foreach ($sequence as
$index => $item) {
36 if ($item->getRefId() === (int) $a_container_child_ref_id) {
43 $previous_item = $sequence[$pos - 1];
44 $post_conditions = array($previous_item->getPostCondition());
46 if (count($post_conditions) > 0) {
47 foreach ($post_conditions as $post_condition) {
49 $condition_op = $post_condition->getConditionOperator();
50 if ($condition_op ===
'learning_progress') {
51 $condition_op =
'learningProgress';
54 $conditions[] =
$f->condition(
55 $f->repositoryTrigger($previous_item->getRefId()),
56 $f->operator()->$condition_op()
64 $condition_set =
$f->set($conditions);
65 return $condition_set;
70 return $this->
getDIC()->conditions()->factory();
88 return $dic[
'ilAccess'];
94 return (
int)
$tree->getParentId($child_ref_id);
105 return $container->getLSItems($container_ref_id);
111 $may_edit = $il_access->checkAccess(
'edit_permission',
'', $container_ref_id);
112 return $may_edit ===
false;
getContainerObject(int $container_ref_id)
Class ilObjLearningSequence.
const STD_ALWAYS_OPERATOR
getConditionSetForRepositoryObject($a_container_child_ref_id)
Returns condition set for a repository object which is children under a container that controls the c...
getParentRefIdFor(int $child_ref_id)
Interface for containers that take over control of conditions for repository object targets...
applyConditionsForCurrentUser(int $container_ref_id)
isContainerConditionController($a_container_ref_id)
Returns true, if the a container controls the conditions of its childrens.ref id of a container bool ...
Handle Conditions within the LearningSequence Objects.
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
getSequencedItems(int $container_ref_id)