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');
24 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
28 $ilAccess = $DIC[
'ilAccess'];
34 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
35 $this->lng->loadLanguageModule(
'prg');
47 $next_class = $this->ctrl->getNextClass($this);
48 $cmd = $this->ctrl->getCmd();
50 switch ($next_class) {
51 case 'ilpermissiongui':
52 $this->tabs_gui->setTabActive(
'perm_settings');
53 include_once(
'Services/AccessControl/classes/class.ilPermissionGUI.php');
55 $this->ctrl->forwardCommand($perm_gui);
57 case 'ilstudyprogrammetypegui':
58 $this->tabs_gui->setTabActive(
'prg_subtypes');
60 $this->ctrl->forwardCommand($type_gui);
63 if (!$cmd || $cmd ==
"view") {
64 $cmd =
"editSettings";
73 $this->tabs_gui->setTabActive(
'settings');
78 $this->tpl->setContent($a_form->getHTML());
84 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
86 $form->setFormAction($this->ctrl->getFormAction($this,
"saveSettings"));
87 $form->setTitle($this->lng->txt(
"settings"));
89 $radio_grp =
new ilRadioGroupInputGUI($this->lng->txt(
"prg_show_programmes"),
"visible_on_personal_desktop");
94 $radio_grp->setValue($value);
95 $form->addItem($radio_grp);
98 $form->addCommandButton(
"saveSettings", $this->lng->txt(
"save"));
99 $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
110 if (
$form->checkInput()) {
114 $form->getInput(
'visible_on_personal_desktop')
117 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
118 $this->ctrl->redirect($this,
"editSettings");
122 $form->setValuesByPost();
129 $rbacsystem = $DIC[
'rbacsystem'];
134 if ($rbacsystem->checkAccess(
'visible,read', $this->object->getRefId())) {
135 $this->tabs_gui->addTarget(
'settings', $this->ctrl->getLinkTargetByClass(
'ilObjStudyProgrammeAdminGUI',
'view'));
137 $this->tabs_gui->addTarget(
'prg_subtypes', $this->ctrl->getLinkTargetByClass(array(
138 'ilObjStudyProgrammeAdminGUI',
139 'ilStudyProgrammeTypeGUI' 142 if ($rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
143 $this->tabs_gui->addTarget(
'perm_settings', $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
'perm'), array(),
'ilpermissiongui');
149 $this->ctrl->initBaseClass(
"ilAdministrationGUI");
150 $this->ctrl->setParameterByClass(
"ilObjStudyProgrammeAdminGUI",
"ref_id",
$ref_id);
151 $this->ctrl->setParameterByClass(
"ilObjStudyProgrammeAdminGUI",
"admin_mode",
"settings");
152 $this->ctrl->redirectByClass(array(
"ilAdministrationGUI",
"ilObjStudyProgrammeAdminGUI" ),
"view");
This class represents an option in a radio group.
const SETTING_VISIBLE_ON_PD_ALLWAYS
Class ilStudyProgrammeTypeGUI.
prepareOutput($a_show_subobjects=true)
prepare output
const SETTING_VISIBLE_ON_PD_READ
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
if(isset($_POST['submit'])) $form
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.
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