19 declare(strict_types=1);
88 $this->tpl = $DIC[
'tpl'];
89 $this->
ctrl = $DIC[
'ilCtrl'];
90 $this->ilLocator = $DIC[
'ilLocator'];
91 $this->tree = $DIC[
'tree'];
92 $this->
toolbar = $DIC[
'ilToolbar'];
93 $this->
ilLog = $DIC[
'ilLog'];
94 $this->
ilias = $DIC[
'ilias'];
96 $this->
help = $DIC[
'ilHelp'];
97 $this->
user = $DIC[
'ilUser'];
99 $this->request_wrapper = $DIC->http()->wrapper()->query();
101 $ref_id = $this->request_wrapper->retrieve(
"ref_id", $this->
refinery->kindlyTo()->int());
108 $this->settings_gui =
$dic[
'ilObjStudyProgrammeSettingsGUI'];
109 $this->members_gui =
$dic[
'ilObjStudyProgrammeMembersGUI'];
110 $this->memberships_gui =
$dic[
'ilObjStudyProgrammeAutoMembershipsGUI'];
111 $this->type_gui =
$dic[
'ilStudyProgrammeTypeGUI'];
112 $this->autocategories_gui =
$dic[
'ilObjStudyProgrammeAutoCategoriesGUI'];
113 $this->type_repository =
$dic[
'model.Type.ilStudyProgrammeTypeRepository'];
114 $this->ui_factory =
$dic[
'ui.factory'];
116 $this->internal_domain_service = $DIC->container()->internal()->domain()->content();
117 $this->container_view_manager = $this->internal_domain_service->view($this->
object);
122 $cmd = $this->
ctrl->getCmd(self::SUBTAB_VIEW_MANAGE);
123 $next_class = $this->
ctrl->getNextClass($this);
125 if (!in_array($cmd, self::ASYNC_CALLS)) {
127 parent::prepareOutput();
131 switch ($next_class) {
132 case "ilinfoscreengui":
133 $this->tabs_gui->activateTab(self::TAB_INFO);
158 case 'ilpermissiongui':
159 $this->tabs_gui->activateTab(
'perm_settings');
161 $this->
ctrl->forwardCommand($ilPermissionGUI);
163 case "ilcommonactiondispatchergui":
167 case "ilobjstudyprogrammesettingsgui":
170 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
171 $this->tabs_gui->activateSubTab(
'settings');
172 $this->settings_gui->setRefId($this->ref_id);
173 $this->
ctrl->forwardCommand($this->settings_gui);
175 case "ilobjstudyprogrammeautocategoriesgui":
178 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
179 $this->tabs_gui->activateSubTab(
'auto_content');
180 $this->autocategories_gui->setRefId($this->ref_id);
182 $this->
ctrl->forwardCommand($this->autocategories_gui);
184 case "ilobjstudyprogrammemembersgui":
187 $this->tabs_gui->activateTab(self::TAB_MEMBERS);
188 $this->tabs_gui->activateSubTab(
'edit_participants');
189 $this->members_gui->setParentGUI($this);
190 $this->members_gui->setRefId($this->ref_id);
191 $this->
ctrl->forwardCommand($this->members_gui);
193 case 'ilprgmembersexportgui':
196 $this->tabs_gui->activateTab(self::TAB_MEMBERS);
197 $this->tabs_gui->activateSubTab(
'export_memberships');
202 $specific_dic[
'ilStudyProgrammeUserTable'],
203 $specific_dic[
'DataFactory']
205 $this->
ctrl->forwardCommand($export_gui);
207 case "ilobjstudyprogrammeautomembershipsgui":
210 $this->tabs_gui->activateTab(self::TAB_MEMBERS);
211 $this->tabs_gui->activateSubTab(
'auto_memberships');
212 $this->memberships_gui->setParentGUI($this);
213 $this->memberships_gui->setRefId($this->ref_id);
214 $this->
ctrl->forwardCommand($this->memberships_gui);
216 case 'ilstudyprogrammetypegui':
217 $this->tabs_gui->activateTab(
'subtypes');
218 $this->type_gui->setParentGUI($this);
219 $this->
ctrl->forwardCommand($this->type_gui);
221 case 'ilobjectcopygui':
222 $gui =
new ilobjectcopygui($this);
225 case strtolower(TranslationGUI::class):
228 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
229 $this->tabs_gui->activateSubTab(
'settings_trans');
243 $this->
ctrl->forwardCommand($transgui);
245 case "ilcertificategui":
248 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
249 $this->tabs_gui->activateSubTab(
'certificate');
251 $output_gui = $guiFactory->create($this->
object);
252 $this->
ctrl->forwardCommand($output_gui);
254 case "ilprgpageobjectgui":
256 if (!$this->
object->hasContentPage()) {
257 $this->
object->createContentPage();
260 $gui->setItemPresentationManager(
261 $this->internal_domain_service
268 $this->content_style_gui->addCss($this->tpl, $this->
object->getRefId());
270 if (!is_null(
$out)) {
271 $this->tpl->setContent(
$out);
274 case "ilobjstylesheetgui":
275 $this->forwardToStyleSheet();
277 case "ilobjectcontentstylesettingsgui":
278 $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
279 $settings_gui = $this->content_style_gui
280 ->objectSettingsGUIForRefId(
null, $this->
object->getRefId());
281 $this->
ctrl->forwardCommand($settings_gui);
283 case strtolower(ilPropertyFormGUI::class):
295 $this->
object->getSettings()->getTypeSettings()->getTypeId()
317 case self::SUBTAB_VIEW_MANAGE:
322 parent::deleteObject();
324 case 'confirmedDelete':
325 parent::confirmedDeleteObject();
327 case 'editAdvancedSettings':
328 $this->tabs_gui->activateTab(
'edit_advanced_settings');
331 case 'updateAdvancedSettings':
332 $this->tabs_gui->activateTab(
'edit_advanced_settings');
336 $this->
ctrl->redirectByClass(
"ilInfoScreenGUI",
"showSummary");
338 case 'editPageFrame':
341 case 'editStyleProperties':
346 case 'disableAdministrationPanel':
347 case 'enableAdministrationPanel':
352 case 'confirmRemoveFromSystem':
353 case 'removeFromSystem':
354 case 'deliverCertificate':
356 case 'removeFromDesk':
359 case 'performPasteIntoMultipleObjects':
360 case 'cancelMoveLink':
361 case 'keepObjectsInClipboard':
369 case 'editAvailabilityPeriod':
370 case 'saveAvailabilityPeriod':
371 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'prg_availability_action_not_allowed'));
375 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'prg_cut_action_not_allowed'));
378 case 'routeImportCmd':
379 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'prg_import_action_not_allowed'));
384 throw new ilException(
"ilObjStudyProgrammeGUI: Command not supported: $cmd");
388 throw new ilException(
"ilObjStudyProgrammeGUI: Can't forward to next class $next_class");
394 parent::createObject();
397 protected function save(): void
399 parent::saveObject();
415 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"object_added"),
true);
417 $this->
ctrl->setParameter($this,
"ref_id", $new_object->
getRefId());
420 $this->
ctrl->getLinkTarget($this,
"edit",
"",
false,
false)
426 if (!$this->permissions) {
427 if (!$this->
object || !$this->
object->getRefId()) {
428 throw new LogicException(
'Cannot ask for permission when not in tree!');
436 protected function view(): void
439 $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
440 parent::renderObject();
456 $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
"permission_denied"),
true);
457 $this->
ctrl->redirect($this);
465 $this->
object->getSettings()->getTypeSettings()->getTypeId()
475 $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
"permission_denied"),
true);
476 $this->
ctrl->redirect($this);
484 $this->
object->getSettings()->getTypeSettings()->getTypeId()
490 if (
$gui->importEditFormPostValues()) {
491 $gui->writeEditForm();
492 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
'settings_saved'),
true);
493 $this->
ctrl->redirect($this,
'editAdvancedSettings');
505 $asyncForm =
new ilAsyncPropertyFormGUI($this->request_wrapper);
507 $asyncForm->cloneForm(
510 $asyncForm->setAsync(
true);
533 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"msg_no_perm_write"));
534 $this->
ctrl->redirectByClass(
'ilinfoscreengui',
'');
536 $this->
ilias->raiseError($this->
lng->txt(
"msg_no_perm_read"), $this->
ilias->error_obj->WARNING);
543 $this->
help->setScreenIdComponent(
"prg");
545 $this->tabs_gui->addTab(self::TAB_VIEW_CONTENT, $this->
lng->txt(
"content"), $this->
getLinkTarget(
"view"));
549 $this->tabs_gui->addTab(
551 $this->
lng->txt(
"info_short"),
557 $this->tabs_gui->addTab(
559 $this->
lng->txt(
"settings"),
565 $this->tabs_gui->addTab(
567 $this->
lng->txt(
"assignments"),
572 if ($this->
object->hasAdvancedMetadata()
575 $this->tabs_gui->addTab(
577 $this->
lng->txt(
'meta_data'),
578 $this->
ctrl->getLinkTarget($this,
'editAdvancedSettings')
591 switch ($parent_tab) {
592 case self::TAB_VIEW_CONTENT:
593 case self::SUBTAB_VIEW_MANAGE:
600 $this->tabs_gui->addSubTab(
602 $this->
lng->txt(
'general'),
606 if ($this->
object->isAutoContentApplicable()) {
607 $this->tabs_gui->addSubTab(
609 $this->
lng->txt(
"content_automation"),
614 $this->tabs_gui->addSubTab(
616 $this->
lng->txt(
"obj_multilinguality"),
617 $this->
ctrl->getLinkTargetByClass(TranslationGUI::class,
"")
621 if (
true === $validator->validate()) {
622 $this->tabs_gui->addSubTabTarget(
624 $this->
ctrl->getLinkTargetByClass(
"ilcertificategui",
"certificateeditor"),
630 if ($this->permissions->isOrguAccessEnabledGlobally()) {
631 $this->tabs_gui->addSubTab(
633 $this->
lng->txt(
"obj_features"),
641 $this->tabs_gui->addSubTab(
643 $this->
lng->txt(
'edit_participants'),
648 $this->tabs_gui->addSubTab(
650 $this->
lng->txt(
'auto_memberships'),
656 $this->tabs_gui->addSubTab(
657 'export_memberships',
658 $this->
lng->txt(
'export_memberships'),
678 if ($cmd ===
"info_short") {
679 return $this->
ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary");
681 if ($cmd ===
"settings") {
682 return $this->
ctrl->getLinkTargetByClass(
"ilobjstudyprogrammesettingsgui",
"view");
684 if ($cmd ===
"auto_content") {
685 return $this->
ctrl->getLinkTargetByClass(
"ilObjStudyProgrammeAutoCategoriesGUI",
"view");
687 if ($cmd === self::SUBTAB_VIEW_MANAGE) {
688 return $this->
ctrl->getLinkTarget($this, self::SUBTAB_VIEW_MANAGE);
691 if ($cmd ===
"members") {
692 return $this->
ctrl->getLinkTargetByClass(
"ilobjstudyprogrammemembersgui",
"view");
694 if ($cmd ===
"memberships") {
695 return $this->
ctrl->getLinkTargetByClass(
"ilobjstudyprogrammeautomembershipsgui",
"view");
697 if ($cmd ==
"export_memberships") {
698 return $this->
ctrl->getLinkTargetByClass(
'ilprgmembersexportgui',
'show');
700 if ($cmd ===
"subtypes") {
701 return $this->
ctrl->getLinkTargetByClass(
"ilstudyprogrammetypegui",
"listTypes");
703 if ($cmd ===
"commonSettings") {
704 return $this->
ctrl->getLinkTargetByClass(
706 "ilobjstudyprogrammesettingsgui",
707 "ilStudyProgrammeCommonSettingsGUI" 712 if ($cmd ==
"edit_page") {
713 return $this->
ctrl->getLinkTargetByClass(
714 [
"ilObjStudyProgrammeGUI",
"ilPRGPageObjectGUI"],
719 return $this->
ctrl->getLinkTarget($this, $cmd);
727 if (!$this->
object->getSettings()->getTypeSettings()->getTypeId() ||
729 ->getType($this->
object->getSettings()->getTypeSettings()->getTypeId())
739 $this->
object->getSettings()->getTypeSettings()->getTypeId()
742 $record_gui->parse();
745 protected function edit(): void
748 $link = $this->
ctrl->getLinkTargetByClass(ilObjStudyProgrammeSettingsGUI::class,
'view');
749 $this->
ctrl->redirectToURL($link);
752 public static function _goto(
string $target): void
755 $ilCtrl = $DIC[
'ilCtrl'];
756 $ilCtrl->setTargetScript(
'ilias.php');
757 $ilCtrl->setParameterByClass(
"ilobjstudyprogrammegui",
"ref_id", $target);
758 $ilCtrl->redirectByClass(array(
"ilRepositoryGUI",
"ilobjstudyprogrammegui"),
"view");
764 $ilNavigationHistory = $DIC[
'ilNavigationHistory'];
767 $ref_id = $this->request_wrapper->retrieve(
"ref_id", $this->
refinery->kindlyTo()->int());
768 $link = ilLink::_getLink(
$ref_id,
"prg");
769 $ilNavigationHistory->addItem(
$ref_id, $link,
'prg');
775 $lg = parent::initHeaderAction($sub_type, $sub_id);
777 if ($lg &&
true === $validator->isCertificateDownloadable($this->user->getId(), $this->
object->getId())) {
778 $cert_url = $this->
ctrl->getLinkTarget($this,
"deliverCertificate");
779 $this->
lng->loadLanguageModule(
"certificate");
780 $lg->addCustomCommand($cert_url,
"download_certificate");
784 $this->
lng->txt(
"download_certificate"),
795 $this->
lng->loadLanguageModule(
'cert');
798 $obj_id = $this->
object->getId();
801 if (
false === $validator->isCertificateDownloadable(
$user_id,
$obj_id)) {
802 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"),
true);
803 $this->
ctrl->redirect($this);
809 $this->
lng->txt(
'error_creating_certificate_pdf')
ilObjStudyProgrammeMembersGUI $members_gui
ilStudyProgrammeTypeGUI $type_gui
Class ilObjStudyProgrammeGUI class ilObjStudyProgrammeGUI: ilPermissionGUI ilObjStudyProgrammeGUI: ...
PageObjectGUI for StudyProgrammes.
denyAccessIfNotAnyOf(array $permissions)
ilObjStudyProgrammeAutoMembershipsGUI $memberships_gui
afterSave(ilObject $new_object)
Sets the sorting of the container correctly.
ilStudyProgrammeTypeRepository $type_repository
GUI class for object translation handling.
Class ilObjStudyProgrammeAutoCategoriesGUI.
static _goto(string $target)
ILIAS Container Content DomainService $internal_domain_service
getSubTabs(string $parent_tab)
Adds subtabs based on the parent tab.
const CMD_GET_ASYNC_MODAL
Component logger with individual log levels by component id.
fillInfoScreen($info_screen)
Adding meta-data to the info-screen.
loadLanguageModule(string $a_module)
Load language module.
ilObjStudyProgrammeSettingsGUI $settings_gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS UI Factory $ui_factory
checkAccess(string $permission)
deliverCertificateObject()
Covers the persistence of sp-type related information.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
editStylePropertiesObject()
const SORT_NEW_ITEMS_POSITION_BOTTOM
static http()
Fetches the global http state from ILIAS.
denyAccessIfNot(string $permission)
initHeaderAction(?string $sub_type=null, ?int $sub_id=null)
addStandardContainerSubTabs(bool $a_include_view=true)
Add standard container subtabs for view, manage, oderdering and text/media editor link...
getAsyncCreationForm()
Method for implementing async windows-output Should be moved into core to enable async requests on cr...
const SORT_NEW_ITEMS_ORDER_CREATION
const CMD_GET_ASYNC_MODAL_OUTPUT
Validates if an active certificate is stored in the database and can be downloaded by the user...
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
Class ilObjForumAdministration.
static specificDicFor(ilObjStudyProgramme $prg)
ilObjStudyProgrammeMembersGUI: ilStudyProgrammeRepositorySearchGUI ilObjStudyProgrammeMembersGUI: il...
Both role and OrgU-based permissions are relevant in many places of the PRG.
getLinkTarget(string $cmd)
Generates a link based on a cmd.
setContentSubTabs()
Disable default content subtabs.
ViewManager $container_view_manager
ilPRGPermissionsHelper $permissions
ilObjStudyProgrammeAutoCategoriesGUI $autocategories_gui
__construct(Container $dic, ilPlugin $plugin)
getReturnLocation(string $cmd, string $default_location="")
Get return location for command (command is method name without "Object", e.g.
initCreateForm(string $new_type)
Class ilObjStudyProgrammeAutoMembershipsGUI.
RequestWrapper $request_wrapper
setInfoObject(ilInfoScreenGUI $info)
get info sections
ILIAS Container InternalGUIService $gui
const ROLEPERM_MANAGE_MEMBERS
export assignments of PRG
initAdvancedSettingsForm()
addHeaderAction()
Add header action menu.
static init(?ilGlobalTemplateInterface $a_main_tpl=null)
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
ilObjStudyProgrammeSettingsGUI: ilStudyProgrammeCommonSettingsGUI
Refinery Factory $refinery
downloadPdf(int $userId, int $objectId)