19 declare(strict_types=1);
83 $this->tpl = $DIC[
'tpl'];
84 $this->
ctrl = $DIC[
'ilCtrl'];
85 $this->ilLocator = $DIC[
'ilLocator'];
86 $this->tree = $DIC[
'tree'];
87 $this->
toolbar = $DIC[
'ilToolbar'];
88 $this->
ilLog = $DIC[
'ilLog'];
89 $this->
ilias = $DIC[
'ilias'];
91 $this->
help = $DIC[
'ilHelp'];
92 $this->
user = $DIC[
'ilUser'];
94 $this->request_wrapper = $DIC->http()->wrapper()->query();
96 $ref_id = $this->request_wrapper->retrieve(
"ref_id", $this->
refinery->kindlyTo()->int());
103 $this->settings_gui =
$dic[
'ilObjStudyProgrammeSettingsGUI'];
104 $this->members_gui =
$dic[
'ilObjStudyProgrammeMembersGUI'];
105 $this->memberships_gui =
$dic[
'ilObjStudyProgrammeAutoMembershipsGUI'];
106 $this->tree_gui =
$dic[
'ilObjStudyProgrammeTreeGUI'];
107 $this->type_gui =
$dic[
'ilStudyProgrammeTypeGUI'];
108 $this->autocategories_gui =
$dic[
'ilObjStudyProgrammeAutoCategoriesGUI'];
109 $this->type_repository =
$dic[
'model.Type.ilStudyProgrammeTypeRepository'];
110 $this->ui_factory =
$dic[
'ui.factory'];
112 $this->internal_domain_service = $DIC->container()->internal()->domain()->content();
113 $this->container_view_manager = $this->internal_domain_service->view($this->
object);
118 $cmd = $this->
ctrl->getCmd();
119 $next_class = $this->
ctrl->getNextClass($this);
121 if ($cmd ==
"" || $cmd === null) {
126 parent::prepareOutput();
130 switch ($next_class) {
131 case "ilinfoscreengui":
132 $this->tabs_gui->activateTab(self::TAB_INFO);
139 $this->
ctrl->forwardCommand($info);
157 case 'ilpermissiongui':
158 $this->tabs_gui->activateTab(
'perm_settings');
160 $this->
ctrl->forwardCommand($ilPermissionGUI);
162 case "ilcommonactiondispatchergui":
166 case "ilobjstudyprogrammesettingsgui":
169 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
170 $this->tabs_gui->activateSubTab(
'settings');
171 $this->settings_gui->setRefId($this->ref_id);
172 $this->
ctrl->forwardCommand($this->settings_gui);
174 case "ilobjstudyprogrammeautocategoriesgui":
177 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
178 $this->tabs_gui->activateSubTab(
'auto_content');
179 $this->autocategories_gui->setRefId($this->ref_id);
181 $this->
ctrl->forwardCommand($this->autocategories_gui);
183 case "ilobjstudyprogrammemembersgui":
186 $this->tabs_gui->activateTab(self::TAB_MEMBERS);
187 $this->tabs_gui->activateSubTab(
'edit_participants');
188 $this->members_gui->setParentGUI($this);
189 $this->members_gui->setRefId($this->ref_id);
190 $this->
ctrl->forwardCommand($this->members_gui);
192 case 'ilprgmembersexportgui':
195 $this->tabs_gui->activateTab(self::TAB_MEMBERS);
196 $this->tabs_gui->activateSubTab(
'export_memberships');
201 $specific_dic[
'ilStudyProgrammeUserTable'],
202 $specific_dic[
'DataFactory']
204 $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 "ilobjstudyprogrammetreegui":
220 $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
221 $this->tabs_gui->activateSubTab(self::SUBTAB_VIEW_TREE);
222 $this->tree_gui->setRefId($this->
id);
223 $this->
ctrl->forwardCommand($this->tree_gui);
225 case 'ilstudyprogrammetypegui':
226 $this->tabs_gui->activateTab(
'subtypes');
227 $this->type_gui->setParentGUI($this);
228 $this->
ctrl->forwardCommand($this->type_gui);
230 case 'ilobjectcopygui':
231 $gui =
new ilobjectcopygui($this);
234 case 'ilobjecttranslationgui':
237 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
238 $this->tabs_gui->activateSubTab(
'settings_trans');
240 $this->
ctrl->forwardCommand($transgui);
242 case "ilcertificategui":
245 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
246 $this->tabs_gui->activateSubTab(
'certificate');
248 $output_gui = $guiFactory->create($this->
object);
249 $this->
ctrl->forwardCommand($output_gui);
251 case "ilprgpageobjectgui":
253 if (!$this->
object->hasContentPage()) {
254 $this->
object->createContentPage();
257 $gui->setItemPresentationManager(
258 $this->internal_domain_service
265 $this->content_style_gui->addCss($this->tpl, $this->
object->getRefId());
266 $this->
ctrl->setCmd($cmd);
268 if (!is_null(
$out)) {
269 $this->tpl->setContent(
$out);
272 case "ilobjstylesheetgui":
273 $this->forwardToStyleSheet();
275 case "ilobjectcontentstylesettingsgui":
276 $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
277 $settings_gui = $this->content_style_gui
278 ->objectSettingsGUIForRefId(null, $this->
object->getRefId());
279 $this->
ctrl->forwardCommand($settings_gui);
281 case strtolower(ilPropertyFormGUI::class):
293 $this->
object->getSettings()->getTypeSettings()->getTypeId()
316 $this->tabs_gui->clearTargets();
317 $this->tabs_gui->setBackTarget($this->
lng->txt(
"back"), $this->
ctrl->getLinkTarget($this));
318 parent::deleteObject();
320 case 'confirmedDelete':
321 parent::confirmedDeleteObject();
323 case 'editAdvancedSettings':
324 $this->tabs_gui->activateTab(
'edit_advanced_settings');
327 case 'updateAdvancedSettings':
328 $this->tabs_gui->activateTab(
'edit_advanced_settings');
332 $this->
ctrl->redirectByClass(
"ilInfoScreenGUI",
"showSummary");
334 case 'getAsynchItemList':
335 parent::getAsynchItemListObject();
338 case 'editPageFrame':
341 case 'editStyleProperties':
347 case 'confirmRemoveFromSystem':
348 case 'removeFromSystem':
349 case 'deliverCertificate':
351 case 'removeFromDesk':
356 case 'performPasteIntoMultipleObjects':
357 case 'cancelMoveLink':
358 case 'keepObjectsInClipboard':
364 throw new ilException(
"ilObjStudyProgrammeGUI: Command not supported: $cmd");
368 throw new ilException(
"ilObjStudyProgrammeGUI: Can't forward to next class $next_class");
374 parent::createObject();
377 protected function save(): void
379 parent::saveObject();
381 if ($this->
ctrl->isAsynch()) {
385 "cmd" => $this->
ctrl->getCmd(),
387 "errors" =>
$form->getErrors()
399 parent::cancelCreation();
418 "message" => $this->
lng->txt(
"object_added")
423 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"object_added"),
true);
425 $this->
ctrl->setParameter($this,
"ref_id", $new_object->
getRefId());
428 $this->
ctrl->getLinkTarget($this,
"edit",
"",
false,
false)
434 if (!$this->permissions) {
435 if (!$this->
object || !$this->
object->getRefId()) {
436 throw new LogicException(
'Cannot ask for permission when not in tree!');
444 protected function view(): void
447 $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
448 parent::renderObject();
469 $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
"permission_denied"),
true);
470 $this->
ctrl->redirect($this);
478 $this->
object->getSettings()->getTypeSettings()->getTypeId()
488 $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
"permission_denied"),
true);
489 $this->
ctrl->redirect($this);
497 $this->
object->getSettings()->getTypeSettings()->getTypeId()
503 if (
$gui->importEditFormPostValues()) {
504 $gui->writeEditForm();
505 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
'settings_saved'),
true);
506 $this->
ctrl->redirect($this,
'editAdvancedSettings');
517 return array(self::CFORM_NEW => $this->
initCreateForm($new_type));
529 $asyncForm->cloneForm($tmp_forms[self::CFORM_NEW]);
530 $asyncForm->setAsync(
true);
553 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"msg_no_perm_write"));
554 $this->
ctrl->redirectByClass(
'ilinfoscreengui',
'');
556 $this->
ilias->raiseError($this->
lng->txt(
"msg_no_perm_read"), $this->
ilias->error_obj->WARNING);
563 $this->
help->setScreenIdComponent(
"prg");
565 $this->tabs_gui->addTab(self::TAB_VIEW_CONTENT, $this->
lng->txt(
"content"), $this->
getLinkTarget(
"view"));
569 $this->tabs_gui->addTab(
571 $this->
lng->txt(
"info_short"),
577 $this->tabs_gui->addTab(
579 $this->
lng->txt(
"settings"),
585 $this->tabs_gui->addTab(
587 $this->
lng->txt(
"assignments"),
592 if ($this->
object->hasAdvancedMetadata()
595 $this->tabs_gui->addTab(
597 $this->
lng->txt(
'meta_data'),
598 $this->
ctrl->getLinkTarget($this,
'editAdvancedSettings')
611 switch ($parent_tab) {
612 case self::TAB_VIEW_CONTENT:
613 case self::SUBTAB_VIEW_TREE:
616 $this->tabs_gui->addSubTab(
617 self::TAB_VIEW_CONTENT,
618 $this->
lng->txt(
"view"),
624 $this->tabs_gui->addSubTab(
625 self::SUBTAB_VIEW_TREE,
626 $this->
lng->txt(
"cntr_manage"),
632 $this->tabs_gui->addSubTab(
634 $this->
lng->txt(
'settings'),
638 if ($this->
object->isAutoContentApplicable()) {
639 $this->tabs_gui->addSubTab(
641 $this->
lng->txt(
"content_automation"),
646 $this->tabs_gui->addSubTab(
648 $this->
lng->txt(
"obj_multilinguality"),
649 $this->
ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
"")
653 if (
true === $validator->validate()) {
654 $this->tabs_gui->addSubTabTarget(
656 $this->
ctrl->getLinkTargetByClass(
"ilcertificategui",
"certificateeditor"),
662 if ($this->permissions->isOrguAccessEnabledGlobally()) {
663 $this->tabs_gui->addSubTab(
665 $this->
lng->txt(
"obj_features"),
673 $this->tabs_gui->addSubTab(
675 $this->
lng->txt(
'edit_participants'),
680 $this->tabs_gui->addSubTab(
682 $this->
lng->txt(
'auto_memberships'),
688 $this->tabs_gui->addSubTab(
689 'export_memberships',
690 $this->
lng->txt(
'export_memberships'),
710 if ($cmd ===
"info_short") {
711 return $this->
ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary");
713 if ($cmd ===
"settings") {
714 return $this->
ctrl->getLinkTargetByClass(
"ilobjstudyprogrammesettingsgui",
"view");
716 if ($cmd ===
"auto_content") {
717 return $this->
ctrl->getLinkTargetByClass(
"ilObjStudyProgrammeAutoCategoriesGUI",
"view");
719 if ($cmd === self::SUBTAB_VIEW_TREE) {
720 return $this->
ctrl->getLinkTargetByClass(
"ilobjstudyprogrammetreegui",
"view");
722 if ($cmd ===
"members") {
723 return $this->
ctrl->getLinkTargetByClass(
"ilobjstudyprogrammemembersgui",
"view");
725 if ($cmd ===
"memberships") {
726 return $this->
ctrl->getLinkTargetByClass(
"ilobjstudyprogrammeautomembershipsgui",
"view");
728 if ($cmd ==
"export_memberships") {
729 return $this->
ctrl->getLinkTargetByClass(
'ilprgmembersexportgui',
'show');
731 if ($cmd ===
"subtypes") {
732 return $this->
ctrl->getLinkTargetByClass(
"ilstudyprogrammetypegui",
"listTypes");
734 if ($cmd ===
"commonSettings") {
735 return $this->
ctrl->getLinkTargetByClass(
737 "ilobjstudyprogrammesettingsgui",
738 "ilStudyProgrammeCommonSettingsGUI" 743 if ($cmd ==
"edit_page") {
744 return $this->
ctrl->getLinkTargetByClass(
745 [
"ilObjStudyProgrammeGUI",
"ilPRGPageObjectGUI"],
750 return $this->
ctrl->getLinkTarget($this, $cmd);
758 if (!$this->
object->getSettings()->getTypeSettings()->getTypeId() ||
760 ->getType($this->
object->getSettings()->getTypeSettings()->getTypeId())
770 $this->
object->getSettings()->getTypeSettings()->getTypeId()
773 $record_gui->parse();
776 protected function edit(): void
779 $link = $this->
ctrl->getLinkTargetByClass(ilObjStudyProgrammeSettingsGUI::class,
'view');
780 $this->
ctrl->redirectToURL($link);
783 public static function _goto(
string $target): void
786 $ilCtrl = $DIC[
'ilCtrl'];
787 $id = explode(
"_", $target);
788 $ilCtrl->setTargetScript(
'ilias.php');
789 $ilCtrl->setParameterByClass(
"ilobjstudyprogrammegui",
"ref_id",
$id[0]);
790 $ilCtrl->redirectByClass(array(
"ilRepositoryGUI",
"ilobjstudyprogrammegui"),
"view");
796 $ilNavigationHistory = $DIC[
'ilNavigationHistory'];
799 $ref_id = $this->request_wrapper->retrieve(
"ref_id", $this->
refinery->kindlyTo()->int());
800 $link = ilLink::_getLink(
$ref_id,
"prg");
801 $ilNavigationHistory->addItem(
$ref_id, $link,
'prg');
807 $lg = parent::initHeaderAction($sub_type, $sub_id);
809 if ($lg &&
true === $validator->isCertificateDownloadable($this->user->getId(), $this->
object->getId())) {
810 $cert_url = $this->
ctrl->getLinkTarget($this,
"deliverCertificate");
811 $this->
lng->loadLanguageModule(
"certificate");
812 $lg->addCustomCommand($cert_url,
"download_certificate");
816 $this->
lng->txt(
"download_certificate"),
827 $this->
lng->loadLanguageModule(
'cert');
829 $user_id = (
int) $this->
user->getId();
830 $obj_id = $this->
object->getId();
833 if (
false === $validator->isCertificateDownloadable($user_id,
$obj_id)) {
834 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"),
true);
835 $this->
ctrl->redirect($this);
841 $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.
static handleAsyncOutput(string $normal_content, string $async_content=null, bool $apply_to_tpl=true)
Handles async output.
ilStudyProgrammeTypeRepository $type_repository
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
Class ilObjStudyProgrammeAutoCategoriesGUI.
static _goto(string $target)
ILIAS Container Content DomainService $internal_domain_service
getSubTabs(string $parent_tab)
Adds subtabs based on the parent tab.
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()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilObjStudyProgrammeTreeGUI $tree_gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
editStylePropertiesObject()
initCreationForms($new_type)
Overwritten from ilObjectGUI since copy and import are not implemented.
const SORT_NEW_ITEMS_POSITION_BOTTOM
static encodeAsyncResponse(array $data=array())
Encode data as json for async output.
denyAccessIfNot(string $permission)
initHeaderAction(?string $sub_type=null, ?int $sub_id=null)
getAsyncCreationForm()
Method for implementing async windows-output Should be moved into core to enable async requests on cr...
const SORT_NEW_ITEMS_ORDER_CREATION
Validates if an active certificate is stored in the database and can be downloaded by the user...
Interface RequestWrapper.
header include for all ilias files.
static specificDicFor(ilObjStudyProgramme $prg)
ilObjStudyProgrammeMembersGUI: ilStudyProgrammeRepositorySearchGUI ilObjStudyProgrammeMembersGUI: il...
isActiveAdministrationPanel()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Just a wrapper class to create Unit Test for other classes.
getLinkTarget(string $cmd)
Generates a link based on a cmd.
setContentSubTabs()
Disable default content subtabs.
ViewManager $container_view_manager
ilPRGPermissionsHelper $permissions
ilObjStudyProgrammeAutoCategoriesGUI $autocategories_gui
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
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder...
const ROLEPERM_MANAGE_MEMBERS
static init(ilGlobalTemplateInterface $a_main_tpl=null)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
export assignments of PRG
initAdvancedSettingsForm()
addHeaderAction()
Add header action menu.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
GUI class for object translation handling.
ilObjStudyProgrammeSettingsGUI: ilStudyProgrammeCommonSettingsGUI
Class ilObjStudyProgrammeTreeGUI Generates the manage view for ilTrainingProgramme-Repository objects...
Refinery Factory $refinery
downloadPdf(int $userId, int $objectId)