5 require_once(
"./Services/Container/classes/class.ilContainerGUI.php");
6 require_once(
"./Services/AccessControl/classes/class.ilObjRole.php");
7 require_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
8 require_once(
"./Services/AccessControl/classes/class.ilPermissionGUI.php");
9 require_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
10 require_once(
"./Services/Object/classes/class.ilObjectAddNewItemGUI.php");
11 require_once(
"./Modules/StudyProgramme/classes/class.ilObjStudyProgrammeTreeGUI.php");
12 require_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
13 require_once(
"./Modules/StudyProgramme/classes/types/class.ilStudyProgrammeTypeGUI.php");
14 require_once(
"./Modules/StudyProgramme/classes/model/class.ilStudyProgrammeAdvancedMetadataRecord.php");
15 require_once(
"./Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php");
16 require_once(
"./Services/Object/classes/class.ilObjectCopyGUI.php");
17 require_once(
"./Services/Repository/classes/class.ilRepUtil.php");
94 parent::ilContainerGUI(array(), (
int)
$_GET[
'ref_id'],
true,
false);
101 $this->toolbar = $ilToolbar;
105 $this->help = $ilHelp;
107 $lng->loadLanguageModule(
"prg");
112 $cmd = $this->ctrl->getCmd();
113 $next_class = $this->ctrl->getNextClass($this);
121 parent::prepareOutput();
126 switch ($next_class) {
127 case "ilinfoscreengui":
128 $this->tabs_gui->setTabActive(self::TAB_INFO);
132 $this->ctrl->forwardCommand(
$info);
143 case 'ilpermissiongui':
144 $this->tabs_gui->setTabActive(
'perm_settings');
146 $this->ctrl->forwardCommand($ilPermissionGUI);
148 case "ilcommonactiondispatchergui":
149 require_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
151 $this->ctrl->forwardCommand($gui);
153 case "ilobjstudyprogrammesettingsgui":
157 $this->tabs_gui->setTabActive(self::TAB_SETTINGS);
158 $this->tabs_gui->setSubTabActive(
'settings');
160 require_once(
"Modules/StudyProgramme/classes/class.ilObjStudyProgrammeSettingsGUI.php");
162 $this->ctrl->forwardCommand($gui);
174 case "ilobjstudyprogrammemembersgui":
176 $this->tabs_gui->setTabActive(self::TAB_MEMBERS);
177 require_once(
"Modules/StudyProgramme/classes/class.ilObjStudyProgrammeMembersGUI.php");
179 $this->ctrl->forwardCommand($gui);
181 case "ilobjstudyprogrammetreegui":
186 $this->tabs_gui->setTabActive(self::TAB_VIEW_CONTENT);
187 $this->tabs_gui->setSubTabActive(self::SUBTAB_VIEW_TREE);
190 $_SESSION[
"il_cont_admin_panel"] =
false;
193 $this->ctrl->forwardCommand($gui);
195 case 'ilstudyprogrammetypegui':
196 $this->tabs_gui->setTabActive(
'subtypes');
199 $this->ctrl->forwardCommand($types_gui);
201 case 'ilobjectcopygui':
202 $gui =
new ilobjectcopygui($this);
203 $this->ctrl->forwardCommand($gui);
218 $this->tabs_gui->clearTargets();
219 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTarget($this));
220 parent::deleteObject();
222 case 'confirmedDelete':
223 parent::confirmedDeleteObject();
225 case 'editAdvancedSettings':
226 $this->tabs_gui->setTabActive(
"settings");
227 $this->tabs_gui->setSubTabActive(
'edit_advanced_settings');
231 case 'updateAdvancedSettings':
232 $this->tabs_gui->setTabActive(
"settings");
233 $this->tabs_gui->setSubTabActive(
'edit_advanced_settings');
238 $this->ctrl->redirectByClass(
"ilInfoScreenGUI",
"showSummary");
240 case 'getAsynchItemList':
241 parent::getAsynchItemListObject();
245 case 'confirmRemoveFromSystem':
246 case 'removeFromSystem':
312 throw new ilException(
"ilObjStudyProgrammeGUI: Command not supported: $cmd");
316 throw new ilException(
"ilObjStudyProgrammeGUI: Can't forward to next class $next_class");
325 parent::createObject();
335 parent::saveObject();
337 if($this->ctrl->isAsynch()) {
339 $form->setValuesByPost();
356 parent::cancelCreation();
382 $this->ctrl->setParameter($this,
"ref_id", $a_new_object->
getRefId());
384 $this->ctrl->getLinkTarget($this,
"edit",
"",
false,
false)));
393 $this->tabs_gui->setTabActive(self::TAB_VIEW_CONTENT);
395 parent::renderObject();
405 $form->setFormAction($this->ctrl->getFormAction($this));
406 $form->addCommandButton(
'updateAdvancedSettings', $this->lng->txt(
'save'));
407 $form->addCommandButton(
'editAdvancedSettings', $this->lng->txt(
'cancel'));
416 if (!$this->ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
418 $this->ctrl->redirect($this);
424 $this->tpl->setContent($form->getHTML());
432 if (!$this->ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
434 $this->ctrl->redirect($this);
442 if ($gui->importEditFormPostValues()) {
443 $gui->writeEditForm();
445 $this->ctrl->redirect($this,
'editAdvancedSettings');
447 $this->tpl->setContent($form->getHTML());
460 return array( self::CFORM_NEW => $this->
initCreateForm($a_new_type));
474 $asyncForm->cloneForm($tmp_forms[self::CFORM_NEW]);
475 $asyncForm->setAsync(
true);
485 return $this->ilAccess->checkAccess($a_which,
"", $this->ref_id);
493 foreach ($a_perms as $perm) {
501 $this->ctrl->redirectByClass(
'ilinfoscreengui',
'');
504 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"), $this->
ilias->error_obj->WARNING);
518 $this->help->setScreenIdComponent(
"prg");
520 $this->tabs_gui->addTab( self::TAB_VIEW_CONTENT
521 , $this->lng->txt(
"content")
526 $this->tabs_gui->addTab( self::TAB_INFO
527 , $this->lng->txt(
"info_short")
533 $this->tabs_gui->addTab( self::TAB_SETTINGS
534 , $this->lng->txt(
"settings")
538 $this->tabs_gui->addTab( self::TAB_MEMBERS
539 , $this->lng->txt(
"members")
544 parent::getTabs($this->tabs_gui);
553 switch($a_parent_tab) {
554 case self::TAB_VIEW_CONTENT:
555 case self::SUBTAB_VIEW_TREE:
558 $this->tabs_gui->addSubTab(self::TAB_VIEW_CONTENT, $this->lng->txt(
"view"), $this->
getLinkTarget(
"view"));
562 $this->tabs_gui->addSubTab(self::SUBTAB_VIEW_TREE, $this->lng->txt(
"cntr_manage"), $this->
getLinkTarget(self::SUBTAB_VIEW_TREE));
566 case 'editAdvancedSettings':
567 $this->tabs_gui->addSubTab(
'settings', $this->lng->txt(
'settings'), $this->
getLinkTarget(
'settings'));
570 $type = ilStudyProgrammeType::find($this->object->getSubtypeId());
572 if (!is_null($type) && count($type->getAssignedAdvancedMDRecords(
true))) {
573 $this->tabs_gui->addSubTab(
'edit_advanced_settings', $this->lng->txt(
'prg_adv_settings'), $this->ctrl->getLinkTarget($this,
'editAdvancedSettings'));
597 if ($a_cmd ==
"info_short") {
598 return $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary");
600 if ($a_cmd ==
"settings") {
601 return $this->ctrl->getLinkTargetByClass(
"ilobjstudyprogrammesettingsgui",
"view");
603 if($a_cmd == self::SUBTAB_VIEW_TREE) {
604 return $this->ctrl->getLinkTargetByClass(
"ilobjstudyprogrammetreegui",
"view");
606 if ($a_cmd ==
"members") {
607 return $this->ctrl->getLinkTargetByClass(
"ilobjstudyprogrammemembersgui",
"view");
609 if($a_cmd ==
"subtypes") {
610 return $this->ctrl->getLinkTargetByClass(
"ilstudyprogrammetypegui",
"listTypes");
613 return $this->ctrl->getLinkTarget($this, $a_cmd);
623 require_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
624 require_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
625 require_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
626 require_once(
'./Services/ADT/classes/class.ilADTFactory.php');
628 $type = ilStudyProgrammeType::find($this->object->getSubtypeId());
635 $record_gui->parse();
642 $this->tabs_gui->setTabActive(self::TAB_SETTINGS);
643 $this->tabs_gui->setSubTabActive(
'settings');
645 require_once(
"Modules/StudyProgramme/classes/class.ilObjStudyProgrammeSettingsGUI.php");
647 $this->ctrl->setCmd(
"view");
648 $this->ctrl->forwardCommand($gui);
657 public static function _goto($a_target) {
659 $id = explode(
"_", $a_target);
660 $ilCtrl->setTargetScript(
"ilias.php");
661 $ilCtrl->initBaseClass(
"ilRepositoryGUI");
662 $ilCtrl->setParameterByClass(
"ilobjstudyprogrammegui",
"ref_id", $id[0]);
664 $ilCtrl->redirectByClass(array(
"ilRepositoryGUI",
"ilobjstudyprogrammegui" ),
"view");
668 global $ilNavigationHistory;
671 $this->ilAccess->checkAccess(
'read',
'',
$_GET[
'ref_id']))
673 $link = $this->ctrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset");
675 $ilNavigationHistory->addItem(
$_GET[
'ref_id'],
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
view()
Default view method.
Base class for ILIAS Exception handling.
Class ilObjStudyProgrammeGUI class.
setSortMode($a_mode)
set sort mode
setPropertyForm($form)
set property form object
cancel()
Cancel the object generation.
Class ilObject Basic functions for all objects.
denyAccessIfNotAnyOf($a_perms)
Class ilStudyProgrammeTypeGUI.
static _goto($a_target)
_goto Deep link
getSubTabs($a_parent_tab)
Adds subtabs based on the parent tab.
const SORT_NEW_ITEMS_POSITION_BOTTOM
static encodeAsyncResponse(array $data=array())
Encode data as json for async output.
setInfoObject($info)
get info sections
getId()
get object id public
getLinkTarget($a_cmd)
Generates a link based on a cmd.
getAsyncCreationForm()
Method for implementing async windows-output Should be moved into core to enable async requests on cr...
const SORT_NEW_ITEMS_ORDER_CREATION
create()
creates the object
editAdvancedSettings()
Edit Advanced Metadata.
getTabs()
Adds the default tabs to the gui.
redirection script todo: (a better solution should control the processing via a xml file) ...
updateAdvancedSettings()
Update Advanced Metadata.
Class ilObjStudyProgrammeMembersGUI.
initCreateForm($a_new_type)
Init object creation form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
setContentSubTabs()
Disable default content subtabs.
fillInfoScreen($a_info_screen)
Adding meta-data to the info-screen.
getCreationMode()
get creation mode
getRefId()
get reference id public
afterSave(ilObject $a_new_object)
After save hook Sets the sorting of the container correctly.
initCreationForms($a_new_type)
Overwritten from ilObjectGUI since copy and import are not implemented.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.
static redirect($a_script)
http redirect to other script
getReturnLocation($a_cmd, $a_location="")
get return location for command (command is method name without "Object", e.g.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Class ilObjStudyProgrammeSettingsGUI.
Class ilObjStudyProgrammeTreeGUI Generates the manage view for ilTrainingProgramme-Repository objects...
static handleAsyncOutput($normal_content, $async_content=null, $apply_to_tpl=true)
Handles async output.