ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
LSLearnerItem.php
Go to the documentation of this file.
1
<?
php
2
3
declare(strict_types=1);
4
11
class
LSLearnerItem
extends
LSItem
12
{
16
protected
$usr_id
;
17
21
protected
$learning_progress_status
;
22
26
protected
$availability_status
;
27
31
protected
$kiosk_state
;
32
33
34
public
function
__construct
(
35
int
$usr_id
,
36
\
Closure
$learning_progress_status
,
37
int
$availability_status
,
38
ILIAS
\KioskMode\State
$kiosk_state
,
39
LSItem
$ls_item
40
) {
41
$this->usr_id =
$usr_id
;
42
$this->learning_progress_status =
$learning_progress_status
;
43
$this->availability_status =
$availability_status
;
44
$this->kiosk_state =
$kiosk_state
;
45
46
parent::__construct(
47
$ls_item->
getType
(),
48
$ls_item->
getTitle
(),
49
$ls_item->
getDescription
(),
50
$ls_item->
getIconPath
(),
51
$ls_item->
isOnline
(),
52
$ls_item->
getOrderNumber
(),
53
$ls_item->
getPostCondition
(),
54
$ls_item->
getRefId
()
55
);
56
}
57
58
public
function
getUserId
() : int
59
{
60
return
$this->usr_id
;
61
}
62
69
public
function
getLearningProgressStatus
() : int
70
{
71
$lp_call =
$this->learning_progress_status
;
72
$lp = $lp_call($this->
getRefId
(), $this->
getUserId
());
73
return
$lp;
74
}
75
76
public
function
getAvailability
() : int
77
{
78
return
$this->availability_status
;
79
}
80
81
public
function
getState
() :
ILIAS
\KioskMode\State
82
{
83
return
$this->kiosk_state
;
84
}
85
86
public
function
withPostCondition
(
ilLSPostCondition
$postcondition) :
LSItem
87
{
88
throw
new \LogicException(
'keep this item receptive only'
);
89
}
90
91
public
function
withOrderNumber
(
int
$position) :
LSItem
92
{
93
throw
new \LogicException(
'keep this item receptive only'
);
94
}
95
96
public
function
withOnline
(
bool
$online) :
LSItem
97
{
98
throw
new \LogicException(
'keep this item receptive only'
);
99
}
100
}
LSLearnerItem\getUserId
getUserId()
Definition:
LSLearnerItem.php:58
LSItem\getTitle
getTitle()
Definition:
LSItem.php:78
LSItem\getOrderNumber
getOrderNumber()
Definition:
LSItem.php:105
LSLearnerItem\getState
getState()
Definition:
LSLearnerItem.php:81
LSItem\getPostCondition
getPostCondition()
Definition:
LSItem.php:117
LSLearnerItem\withPostCondition
withPostCondition(ilLSPostCondition $postcondition)
Definition:
LSLearnerItem.php:86
LSLearnerItem\getAvailability
getAvailability()
Definition:
LSLearnerItem.php:76
ILIAS
Class BaseForm.
LSItem\getDescription
getDescription()
Definition:
LSItem.php:83
LSLearnerItem\$usr_id
$usr_id
Definition:
LSLearnerItem.php:16
LSItem\getRefId
getRefId()
Definition:
LSItem.php:129
LSLearnerItem\getLearningProgressStatus
getLearningProgressStatus()
Calling a closure here is a breach of the "immutable object" paradigm and no good practice at all! Do...
Definition:
LSLearnerItem.php:69
Closure
LSLearnerItem\$availability_status
$availability_status
Definition:
LSLearnerItem.php:26
LSLearnerItem\__construct
__construct(int $usr_id, \Closure $learning_progress_status, int $availability_status, ILIAS\KioskMode\State $kiosk_state, LSItem $ls_item)
Definition:
LSLearnerItem.php:34
LSItem\getIconPath
getIconPath()
Definition:
LSItem.php:88
LSLearnerItem\$kiosk_state
$kiosk_state
Definition:
LSLearnerItem.php:31
LSItem\isOnline
isOnline()
Definition:
LSItem.php:93
LSItem
Data holding class LSItem .
Definition:
LSItem.php:11
LSLearnerItem\withOnline
withOnline(bool $online)
Definition:
LSLearnerItem.php:96
ilLSPostCondition
A PostCondition does restrict the progression of a user through the learning sequence.
Definition:
class.ilLSPostCondition.php:14
php
LSLearnerItem\$learning_progress_status
$learning_progress_status
Definition:
LSLearnerItem.php:21
LSItem\getType
getType()
Definition:
LSItem.php:73
LSLearnerItem\withOrderNumber
withOrderNumber(int $position)
Definition:
LSLearnerItem.php:91
LSLearnerItem
Add learning progress and availability information to the LSItem.
Definition:
LSLearnerItem.php:11
Modules
LearningSequence
classes
LearnerProgress
LSLearnerItem.php
Generated on Thu Jan 30 2025 19:01:42 for ILIAS by
1.8.13 (using
Doxyfile
)