ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
LSLearnerItem.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
11class LSLearnerItem extends LSItem
12{
16 protected $usr_id;
17
22
27
28 public function __construct(
29 int $usr_id,
32 LSItem $ls_item
33 ) {
34 $this->usr_id = $usr_id;
35 $this->learning_progress_status = $learning_progress_status;
36 $this->availability_status = $availability_status;
38 $ls_item->getType(),
39 $ls_item->getTitle(),
40 $ls_item->getDescription(),
41 $ls_item->getIconPath(),
42 $ls_item->isOnline(),
43 $ls_item->getOrderNumber(),
44 $ls_item->getPostCondition(),
45 $ls_item->getRefId()
46 );
47 }
48
49 public function getUserId() : int
50 {
51 return $this->usr_id;
52 }
53
54 public function getLearningProgressStatus() : int
55 {
57 }
58
59 public function getAvailability() : int
60 {
62 }
63
64 public function withPostCondition(ilLSPostCondition $postcondition) : LSItem
65 {
66 throw new \LogicException('keep this item receptive only');
67 }
68
69 public function withOrderNumber(int $position) : LSItem
70 {
71 throw new \LogicException('keep this item receptive only');
72 }
73
74 public function withOnline(bool $online) : LSItem
75 {
76 throw new \LogicException('keep this item receptive only');
77 }
78}
An exception for terminatinating execution or to throw for unit testing.
Data holding class LSItem .
Definition: LSItem.php:12
getRefId()
Definition: LSItem.php:129
getIconPath()
Definition: LSItem.php:88
getOrderNumber()
Definition: LSItem.php:105
getType()
Definition: LSItem.php:73
getDescription()
Definition: LSItem.php:83
getTitle()
Definition: LSItem.php:78
getPostCondition()
Definition: LSItem.php:117
isOnline()
Definition: LSItem.php:93
Add learning progress and availability information to the LSItem.
withOnline(bool $online)
withPostCondition(ilLSPostCondition $postcondition)
__construct(int $usr_id, int $learning_progress_status, int $availability_status, LSItem $ls_item)
withOrderNumber(int $position)
A PostCondition does restrict the progression of a user through the learning sequence.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc