3 include_once(
'./Services/Object/classes/class.ilObjectGUI.php');
4 include_once(
'./Modules/StudyProgramme/classes/types/class.ilStudyProgrammeTypeGUI.php');
5 require_once(
'./Modules/StudyProgramme/classes/class.ilObjStudyProgrammeAdmin.php');
32 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
35 $ilCtrl = $DIC[
'ilCtrl'];
36 $ilAccess = $DIC[
'ilAccess'];
39 $this->ctrl = $ilCtrl;
44 $this->lng->loadLanguageModule(
'prg');
56 if (!$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
57 $this->error->raiseError($this->lng->txt(
"no_permission"), $this->error->WARNING);
59 $next_class = $this->ctrl->getNextClass($this);
60 $cmd = $this->ctrl->getCmd();
62 switch ($next_class) {
63 case 'ilpermissiongui':
64 $this->tabs_gui->setTabActive(
'perm_settings');
65 include_once(
'Services/AccessControl/classes/class.ilPermissionGUI.php');
67 $this->ctrl->forwardCommand($perm_gui);
69 case 'ilstudyprogrammetypegui':
70 $this->tabs_gui->setTabActive(
'prg_subtypes');
71 $this->type_gui->setParentGUI($this);
72 $this->ctrl->forwardCommand($this->type_gui);
75 if (!$cmd || $cmd ==
"view") {
76 $cmd =
"editSettings";
85 $this->tabs_gui->setTabActive(
'settings');
90 $this->tpl->setContent($a_form->getHTML());
96 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
98 $form->setFormAction($this->ctrl->getFormAction($this,
"saveSettings"));
99 $form->setTitle($this->lng->txt(
"settings"));
101 $radio_grp =
new ilRadioGroupInputGUI($this->lng->txt(
"prg_show_programmes"),
"visible_on_personal_desktop");
106 $radio_grp->setValue($value);
107 $form->addItem($radio_grp);
109 if ($this->
ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
110 $form->addCommandButton(
"saveSettings", $this->lng->txt(
"save"));
111 $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
122 if ($form->checkInput()) {
123 if ($this->
save($form)) {
126 $form->getInput(
'visible_on_personal_desktop')
129 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
130 $this->ctrl->redirect($this,
"editSettings");
134 $form->setValuesByPost();
146 if (
$rbacsystem->checkAccess(
'visible,read', $this->object->getRefId())) {
147 $this->tabs_gui->addTarget(
'settings', $this->ctrl->getLinkTargetByClass(
'ilObjStudyProgrammeAdminGUI',
'view'));
149 $this->tabs_gui->addTarget(
'prg_subtypes', $this->ctrl->getLinkTargetByClass(array(
150 'ilObjStudyProgrammeAdminGUI',
151 'ilStudyProgrammeTypeGUI' 154 if (
$rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
155 $this->tabs_gui->addTarget(
'perm_settings', $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
'perm'), array(),
'ilpermissiongui');
161 $this->ctrl->initBaseClass(
"ilAdministrationGUI");
162 $this->ctrl->setParameterByClass(
"ilObjStudyProgrammeAdminGUI",
"ref_id",
$ref_id);
163 $this->ctrl->setParameterByClass(
"ilObjStudyProgrammeAdminGUI",
"admin_mode",
"settings");
164 $this->ctrl->redirectByClass(array(
"ilAdministrationGUI",
"ilObjStudyProgrammeAdminGUI" ),
"view");
This class represents an option in a radio group.
const SETTING_VISIBLE_ON_PD_ALLWAYS
prepareOutput($a_show_subobjects=true)
prepare output
const SETTING_VISIBLE_ON_PD_READ
Class ilObjectGUI Basic methods of all Output classes.
initFormSettings(ilPropertyFormGUI $a_form=null)
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
const SETTING_VISIBLE_ON_PD
StudyProgramme Administration Settings.
__construct(Container $dic, ilPlugin $plugin)
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
save(ilPropertyFormGUI $a_form)
getAdminTabs()
administration tabs show only permissions and trash folder