19declare(strict_types=1);
57 $this->setting =
$DIC[
'ilSetting'];
60 $this->request_wrapper =
$DIC->http()->wrapper()->query();
74 $this->request_wrapper->retrieve(
"view", $this->refinery->kindlyTo()->int())
76 $this->show_info_message = $viewSettings->isStudyProgrammeViewActive();
98 return parent::getHTML();
104 foreach ($this->users_assignments as $assignment) {
111 $list_item->setShowInfoMessage($this->show_info_message);
112 $list_item->setVisibleOnPDMode($this->visible_on_pd_mode);
113 $content .= $list_item->getHTML();
115 $this->
logger->alert((
string) $e);
117 $this->
logger->alert((
string) $e);
140 if (count($this->users_assignments) === 0) {
143 foreach ($this->users_assignments as $assignment) {
153 if (count($this->users_assignments) === 0) {
156 foreach ($this->users_assignments as $assignment) {
169 protected function hasPermission(ilStudyProgrammeAssignment $assignment,
string $permission): bool
172 return $this->
access->checkAccess($permission,
"", $prg->getRefId(),
"prg", $prg->getId());
175 protected function isVisible(ilStudyProgrammeAssignment $assignment): bool
180 protected function isReadable(ilStudyProgrammeAssignment $assignment): bool
191 $cmd = $this->request_wrapper->retrieve(
"cmd", $this->
refinery->kindlyTo()->string());
192 $expand = $this->request_wrapper->retrieve(
"expand", $this->
refinery->kindlyTo()->bool());
193 $jump_to_selected_list = $cmd ===
"jumpToSelectedItems";
194 $is_ilDashboardGUI = $this->
ctrl->getCmdClass() ===
"ildashboardgui";
195 $is_cmd_show = $this->
ctrl->getCmd() ===
"show";
197 return ($jump_to_selected_list || ($is_ilDashboardGUI && $is_cmd_show)) && !$expand;
202 $this->users_assignments = $this->sp_user_assignment_db->getInstancesOfUser($this->
user->getId());
206 ilStudyProgrammeAssignment $assignment
208 $progress = $assignment->getProgressTree();
210 $progress_gui->setOnlyRelevant(
true);
211 return $progress_gui;
This class represents a block method of a block.
setTitle(string $a_title)
static getLogger(string $a_component_id)
Get component logger.
const SETTING_VISIBLE_ON_PD_ALLWAYS
const SETTING_VISIBLE_ON_PD
static getInstanceByObjId(int $obj_id)
Personal Desktop-Presentation for the Study Programme.
hasPermission(ilStudyProgrammeAssignment $assignment, string $permission)
string $visible_on_pd_mode
isRepositoryObject()
Returns whether block has a corresponding repository object.
userHasVisibleStudyProgrammes()
isVisible(ilStudyProgrammeAssignment $assignment)
isReadable(ilStudyProgrammeAssignment $assignment)
ilStudyProgrammeAssignmentDBRepository $sp_user_assignment_db
new_ilStudyProgrammeAssignmentListGUI(ilStudyProgrammeAssignment $assignment)
userHasReadableStudyProgrammes()
RequestWrapper $request_wrapper
Exception is thrown when progress for some programme node and assignment is missing.
Class ilStudyProgrammeProgressListGUI.
Exception is thrown when invariants on the program tree would be violated by manipulation of tree.
Interface RequestWrapper.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc