ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
LSLearnerItem Class Reference

Add learning progress and availability information to the LSItem. More...

+ Inheritance diagram for LSLearnerItem:
+ Collaboration diagram for LSLearnerItem:

Public Member Functions

 __construct (int $usr_id, \Closure $learning_progress_status, int $availability_status, ILIAS\KioskMode\State $kiosk_state, LSItem $ls_item)
 
 getUserId ()
 
 getLearningProgressStatus ()
 Calling a closure here is a breach of the "immutable object" paradigm and no good practice at all! Do NOT copy! However, this fixes #27853 for relase 5.4 - with release 6, the issue (among others) is solved by restructuring dependencies and re-ordering calls and instantiation. More...
 
 getAvailability ()
 
 getState ()
 
 withPostCondition (ilLSPostCondition $postcondition)
 
 withOrderNumber (int $position)
 
 withOnline (bool $online)
 
- Public Member Functions inherited from LSItem
 __construct (string $type, string $title, string $description, string $icon_path, bool $is_online, int $order_number, \ilLSPostCondition $post_condition, int $ref_id)
 
 getType ()
 
 getTitle ()
 
 getDescription ()
 
 getIconPath ()
 
 isOnline ()
 
 withOnline (bool $online)
 
 getOrderNumber ()
 
 withOrderNumber (int $order_number)
 
 getPostCondition ()
 
 withPostCondition (ilLSPostCondition $postcondition)
 
 getRefId ()
 

Protected Attributes

 $usr_id
 
 $learning_progress_status
 
 $availability_status
 
 $kiosk_state
 
- Protected Attributes inherited from LSItem
 $type
 
 $title
 
 $description
 
 $icon_path
 
 $is_online
 
 $order_number
 
 $post_condition
 
 $ref_id
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

LSLearnerItem::__construct ( int  $usr_id,
\Closure  $learning_progress_status,
int  $availability_status,
ILIAS\KioskMode\State  $kiosk_state,
LSItem  $ls_item 
)

Definition at line 34 of file LSLearnerItem.php.

References $availability_status, $kiosk_state, $learning_progress_status, $usr_id, LSItem\getDescription(), LSItem\getIconPath(), LSItem\getOrderNumber(), LSItem\getPostCondition(), LSItem\getRefId(), LSItem\getTitle(), LSItem\getType(), and LSItem\isOnline().

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  }
getTitle()
Definition: LSItem.php:78
getOrderNumber()
Definition: LSItem.php:105
getPostCondition()
Definition: LSItem.php:117
getDescription()
Definition: LSItem.php:83
getRefId()
Definition: LSItem.php:129
getIconPath()
Definition: LSItem.php:88
isOnline()
Definition: LSItem.php:93
getType()
Definition: LSItem.php:73
+ Here is the call graph for this function:

Member Function Documentation

◆ getAvailability()

LSLearnerItem::getAvailability ( )

Definition at line 76 of file LSLearnerItem.php.

References $availability_status.

76  : int
77  {
79  }

◆ getLearningProgressStatus()

LSLearnerItem::getLearningProgressStatus ( )

Calling a closure here is a breach of the "immutable object" paradigm and no good practice at all! Do NOT copy! However, this fixes #27853 for relase 5.4 - with release 6, the issue (among others) is solved by restructuring dependencies and re-ordering calls and instantiation.

Definition at line 69 of file LSLearnerItem.php.

References $learning_progress_status, LSItem\getRefId(), and getUserId().

69  : int
70  {
72  $lp = $lp_call($this->getRefId(), $this->getUserId());
73  return $lp;
74  }
getRefId()
Definition: LSItem.php:129
+ Here is the call graph for this function:

◆ getState()

LSLearnerItem::getState ( )

Definition at line 81 of file LSLearnerItem.php.

References $kiosk_state.

82  {
83  return $this->kiosk_state;
84  }

◆ getUserId()

LSLearnerItem::getUserId ( )

Definition at line 58 of file LSLearnerItem.php.

References $usr_id.

Referenced by getLearningProgressStatus().

58  : int
59  {
60  return $this->usr_id;
61  }
+ Here is the caller graph for this function:

◆ withOnline()

LSLearnerItem::withOnline ( bool  $online)

Definition at line 96 of file LSLearnerItem.php.

96  : LSItem
97  {
98  throw new \LogicException('keep this item receptive only');
99  }
Data holding class LSItem .
Definition: LSItem.php:11

◆ withOrderNumber()

LSLearnerItem::withOrderNumber ( int  $position)

Definition at line 91 of file LSLearnerItem.php.

91  : LSItem
92  {
93  throw new \LogicException('keep this item receptive only');
94  }
Data holding class LSItem .
Definition: LSItem.php:11

◆ withPostCondition()

LSLearnerItem::withPostCondition ( ilLSPostCondition  $postcondition)

Definition at line 86 of file LSLearnerItem.php.

86  : LSItem
87  {
88  throw new \LogicException('keep this item receptive only');
89  }
Data holding class LSItem .
Definition: LSItem.php:11

Field Documentation

◆ $availability_status

LSLearnerItem::$availability_status
protected

Definition at line 26 of file LSLearnerItem.php.

Referenced by __construct(), and getAvailability().

◆ $kiosk_state

LSLearnerItem::$kiosk_state
protected

Definition at line 31 of file LSLearnerItem.php.

Referenced by __construct(), and getState().

◆ $learning_progress_status

LSLearnerItem::$learning_progress_status
protected

Definition at line 21 of file LSLearnerItem.php.

Referenced by __construct(), and getLearningProgressStatus().

◆ $usr_id

LSLearnerItem::$usr_id
protected

Definition at line 16 of file LSLearnerItem.php.

Referenced by __construct(), and getUserId().


The documentation for this class was generated from the following file: