19 declare(strict_types=1);
38 $this->
lng->loadLanguageModule(
'prg');
92 if (!$this->rbac_system->checkAccess(
"visible,read", $this->object->getRefId())) {
93 $this->error->raiseError($this->
lng->txt(
"no_permission"), $this->error->WARNING);
95 $next_class = $this->
ctrl->getNextClass($this);
96 $cmd = $this->
ctrl->getCmd();
98 switch ($next_class) {
99 case 'ilpermissiongui':
100 $this->tabs_gui->activateTab(
'perm_settings');
102 $this->
ctrl->forwardCommand($perm_gui);
104 case 'ilstudyprogrammetypegui':
105 $this->tabs_gui->activateTab(
'prg_subtypes');
106 $this->type_gui->setParentGUI($this);
107 $this->
ctrl->forwardCommand($this->type_gui);
110 if (!$cmd || $cmd ===
"view") {
111 $cmd =
"editSettings";
120 $this->tabs_gui->activateTab(
'settings');
121 if (is_null($form)) {
124 $this->tpl->setContent($form->getHTML());
130 $form->setFormAction($this->
ctrl->getFormAction($this,
"saveSettings"));
131 $form->setTitle($this->
lng->txt(
"settings"));
143 $this->
lng->txt(
"prg_show_programmes_on_pd_always"),
147 $this->
lng->txt(
"prg_show_programmes_on_pd_only_read"),
152 $radio_grp->setValue($value);
153 $form->addItem($radio_grp);
155 if ($this->
access->checkAccess(
"write",
"", $this->object->getRefId())) {
156 $form->addCommandButton(
"saveSettings", $this->
lng->txt(
"save"));
157 $form->addCommandButton(
"view", $this->
lng->txt(
"cancel"));
168 if ($form->checkInput()) {
169 if ($this->
save($form)) {
172 $form->getInput(
'visible_on_personal_desktop')
175 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"settings_saved"),
true);
176 $this->
ctrl->redirect($this,
"editSettings");
180 $form->setValuesByPost();
186 if ($this->rbac_system->checkAccess(
'visible,read', $this->object->getRefId())) {
187 $this->tabs_gui->addTarget(
189 $this->
ctrl->getLinkTargetByClass(
'ilObjStudyProgrammeAdminGUI',
'view')
192 $this->tabs_gui->addTarget(
194 $this->
ctrl->getLinkTargetByClass(
195 array(
'ilObjStudyProgrammeAdminGUI',
'ilStudyProgrammeTypeGUI'),
200 if ($this->rbac_system->checkAccess(
'edit_permission', $this->object->getRefId())) {
201 $this->tabs_gui->addTarget(
203 $this->
ctrl->getLinkTargetByClass(
'ilpermissiongui',
'perm'),
212 $this->
ctrl->setTargetScript(
'ilias.php');
213 $this->
ctrl->setParameterByClass(
"ilObjStudyProgrammeAdminGUI",
"ref_id",
$ref_id);
214 $this->
ctrl->setParameterByClass(
"ilObjStudyProgrammeAdminGUI",
"admin_mode",
"settings");
215 $this->
ctrl->redirectByClass(array(
"ilAdministrationGUI",
"ilObjStudyProgrammeAdminGUI"),
"view");
This class represents an option in a radio group.
save(ilPropertyFormGUI $form)
const SETTING_VISIBLE_ON_PD_ALLWAYS
__construct($data, int $id, bool $call_by_reference=true, bool $prepare_output=true)
prepareOutput(bool $show_sub_objects=true)
ilStudyProgrammeTypeGUI $type_gui
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const SETTING_VISIBLE_ON_PD_READ
editSettings(?ilPropertyFormGUI $form=null)
getChildSettingsInfo($a_form_id)
const SETTING_VISIBLE_ON_PD
saveChildSettings(ilPropertyFormGUI $form)
StudyProgramme Administration Settings.
__construct(Container $dic, ilPlugin $plugin)
Membership Administration Settings.
addChildContentsTo(ilPropertyFormGUI $form)
getAdministrationFormId()
addFieldsToForm(ilPropertyFormGUI $a_form)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)