ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
class.ilLSPostCondition.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
28
class
ilLSPostCondition
29
{
30
public
const
OPERATOR_LP
=
'learning_progress'
;
31
public
const
OPERATOR_ALWAYS
=
'always'
;
32
public
const
OPERATOR_FAILED
=
'failed'
;
33
public
const
OPERATOR_FINISHED
=
'finished'
;
34
public
const
OPERATOR_NOT_FINISHED
=
'not_finished'
;
35
public
const
OPERATOR_PASSED
=
'passed'
;
36
37
protected
static
$known_operators
= [
38
self::OPERATOR_ALWAYS,
39
self::OPERATOR_FAILED,
40
self::OPERATOR_FINISHED,
41
self::OPERATOR_NOT_FINISHED,
42
self::OPERATOR_PASSED,
43
self::OPERATOR_LP
44
];
45
46
protected
int
$ref_id
;
47
protected
string
$operator
;
48
protected
?
string
$value
;
49
50
public
function
__construct
(
51
int
$ref_id,
52
string
$operator,
53
?
string
$value =
null
54
) {
55
if
(!in_array($operator, self::$known_operators)) {
56
throw
new \InvalidArgumentException(
57
"Unknown operator: $operator"
58
);
59
}
60
61
$this->ref_id =
$ref_id
;
62
$this->
operator
=
$operator
;
63
$this->value =
$value
;
64
}
65
66
public
function
getRefId
():
int
67
{
68
return
$this->ref_id
;
69
}
70
71
public
function
withRefId
(
int
$ref_id): self
72
{
73
$clone = clone $this;
74
$clone->ref_id =
$ref_id
;
75
return
$clone;
76
}
77
78
public
function
getConditionOperator
(): string
79
{
80
return
$this->operator
;
81
}
82
83
public
function
withConditionOperator
(
string
$operator):
ilLSPostCondition
84
{
85
if
(!in_array($operator, self::$known_operators)) {
86
throw
new \InvalidArgumentException(
87
"Unknown operator: $operator"
88
);
89
}
90
91
$clone = clone $this;
92
$clone->operator =
$operator
;
93
return
$clone;
94
}
95
96
public
function
getValue
(): ?string
97
{
98
return
$this->value
;
99
}
100
101
public
function
withValue
(
string
$value):
ilLSPostCondition
102
{
103
$clone = clone $this;
104
$clone->value =
$value
;
105
return
$clone;
106
}
107
}
ilLSPostCondition\getValue
getValue()
Definition:
class.ilLSPostCondition.php:96
ilLSPostCondition\withConditionOperator
withConditionOperator(string $operator)
Definition:
class.ilLSPostCondition.php:83
ilLSPostCondition\OPERATOR_PASSED
const OPERATOR_PASSED
Definition:
class.ilLSPostCondition.php:35
ilLSPostCondition\$known_operators
static $known_operators
Definition:
class.ilLSPostCondition.php:37
ilLSPostCondition\OPERATOR_LP
const OPERATOR_LP
Definition:
class.ilLSPostCondition.php:30
null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Definition:
shib_logout.php:144
ilLSPostCondition\$ref_id
int $ref_id
Definition:
class.ilLSPostCondition.php:46
ilLSPostCondition\__construct
__construct(int $ref_id, string $operator,?string $value=null)
Definition:
class.ilLSPostCondition.php:50
ilLSPostCondition\$operator
string $operator
Definition:
class.ilLSPostCondition.php:47
ilLSPostCondition\getRefId
getRefId()
Definition:
class.ilLSPostCondition.php:66
ilLSPostCondition
A PostCondition does restrict the progression of a user through the learning sequence.
Definition:
class.ilLSPostCondition.php:28
ilLSPostCondition\OPERATOR_ALWAYS
const OPERATOR_ALWAYS
Definition:
class.ilLSPostCondition.php:31
ilLSPostCondition\OPERATOR_NOT_FINISHED
const OPERATOR_NOT_FINISHED
Definition:
class.ilLSPostCondition.php:34
ilLSPostCondition\$value
string $value
Definition:
class.ilLSPostCondition.php:48
ilLSPostCondition\OPERATOR_FINISHED
const OPERATOR_FINISHED
Definition:
class.ilLSPostCondition.php:33
ilLSPostCondition\withValue
withValue(string $value)
Definition:
class.ilLSPostCondition.php:101
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
ilLSPostCondition\getConditionOperator
getConditionOperator()
Definition:
class.ilLSPostCondition.php:78
ilLSPostCondition\withRefId
withRefId(int $ref_id)
Definition:
class.ilLSPostCondition.php:71
ilLSPostCondition\OPERATOR_FAILED
const OPERATOR_FAILED
Definition:
class.ilLSPostCondition.php:32
components
ILIAS
LearningSequence
classes
PostConditions
class.ilLSPostCondition.php
Generated on Sun Aug 31 2025 23:03:13 for ILIAS by
1.8.13 (using
Doxyfile
)