3 declare(strict_types=1);
59 $this->
lng = $language;
73 return $this->
access->checkAccess(self::PERM_PARTICIPATE,
'', $this->lso_ref_id);
84 return $this->
access->checkAccess(self::PERM_UNPARTICIPATE,
'', $this->lso_ref_id);
89 return $this->roles->isMember($this->usr_id);
94 return $this->roles->isCompletedByUser($this->usr_id);
97 protected function getLink(
string $cmd): string
99 return $this->
ctrl->getLinkTargetByClass(
'ilObjLearningSequenceLearnerGUI', $cmd);
104 $cmd = $this->
ctrl->getCmd();
108 if (!$this->ls_items->hasItems()) {
112 $this->
lng->txt(
"lso_player_start"),
113 $this->
getLink(self::CMD_START),
118 if (!$this->
hasCompleted() && $this->ls_items->hasItems()) {
119 $label =
"lso_player_resume";
120 if ($this->first_access === -1) {
121 $label =
"lso_player_start";
124 $this->
lng->txt($label),
125 $this->
getLink(self::CMD_VIEW),
129 if ($this->ls_items->hasItems()) {
131 $this->
lng->txt(
"lso_player_review"),
132 $this->
getLink(self::CMD_VIEW),
137 if ($cmd === self::CMD_STANDARD) {
139 $this->
lng->txt(
"lso_player_extro"),
140 $this->
getLink(self::CMD_EXTRO),
144 if ($cmd === self::CMD_EXTRO) {
146 $this->
lng->txt(
"lso_player_abstract"),
147 $this->
getLink(self::CMD_STANDARD),
155 $this->
lng->txt(
"unparticipate"),
156 $this->
getLink(self::CMD_UNSUBSCRIBE),
167 foreach ($this->
getLinks() as $idx => $entry) {
168 list($label, $link) = $entry;
169 $buttons[] = $this->ui_factory->button()->standard($label, $link);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilLSLearnerItemsQueries $ls_items
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilLanguage $language, ilAccess $access, ilCtrl $ctrl, ILIAS\UI\Factory $ui_factory, int $lso_ref_id, int $usr_id, $first_access, ilLearningSequenceRoles $roles, ilLSLearnerItemsQueries $ls_items)
currentUserMayUnparticipate()
ilLearningSequenceRoles $roles
This combines calls to ProgressDB and StateDB to handle learner-items in the context of a specific LS...
getLaunchbuttonsComponent()
ILIAS UI Factory $ui_factory