5require_once(
"./Services/Container/classes/class.ilContainerGUI.php");
 
    6require_once(
"./Services/AccessControl/classes/class.ilObjRole.php");
 
    7require_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
    8require_once(
"./Services/AccessControl/classes/class.ilPermissionGUI.php");
 
    9require_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
   10require_once(
"./Services/Object/classes/class.ilObjectAddNewItemGUI.php");
 
   11require_once(
"./Modules/StudyProgramme/classes/class.ilObjStudyProgrammeTreeGUI.php");
 
   12require_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
 
   13require_once(
"./Modules/StudyProgramme/classes/types/class.ilStudyProgrammeTypeGUI.php");
 
   14require_once(
"./Modules/StudyProgramme/classes/model/class.ilStudyProgrammeAdvancedMetadataRecord.php");
 
   15require_once(
"./Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php");
 
   16require_once(
"./Services/Object/classes/class.ilObjectCopyGUI.php");
 
   17require_once(
"./Services/Repository/classes/class.ilRepUtil.php");
 
   96                $ilToolbar = 
$DIC[
'ilToolbar'];
 
  102                $ilHelp = 
$DIC[
'ilHelp'];
 
  104                parent::__construct(array(), (
int) 
$_GET[
'ref_id'], 
true, 
false);
 
  111                $this->toolbar = $ilToolbar;
 
  115                $this->help = $ilHelp;
 
  117                $lng->loadLanguageModule(
"prg");
 
  122                $cmd = $this->ctrl->getCmd();
 
  123                $next_class = $this->ctrl->getNextClass($this);
 
  131                parent::prepareOutput();
 
  136                switch ($next_class) {
 
  137                        case "ilinfoscreengui":
 
  138                                $this->tabs_gui->setTabActive(self::TAB_INFO);
 
  142                                $this->ctrl->forwardCommand(
$info);
 
  153                        case 'ilpermissiongui':
 
  154                                $this->tabs_gui->setTabActive(
'perm_settings');
 
  156                                $this->ctrl->forwardCommand($ilPermissionGUI);
 
  158                        case "ilcommonactiondispatchergui":
 
  159                                require_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
 
  161                                $this->ctrl->forwardCommand($gui);
 
  163                        case "ilobjstudyprogrammesettingsgui":
 
  167                                $this->tabs_gui->setTabActive(self::TAB_SETTINGS);
 
  168                                $this->tabs_gui->setSubTabActive(
'settings');
 
  170                                require_once(
"Modules/StudyProgramme/classes/class.ilObjStudyProgrammeSettingsGUI.php");
 
  172                                $this->ctrl->forwardCommand($gui);
 
  184                        case "ilobjstudyprogrammemembersgui":
 
  186                                $this->tabs_gui->setTabActive(self::TAB_MEMBERS);
 
  187                                require_once(
"Modules/StudyProgramme/classes/class.ilObjStudyProgrammeMembersGUI.php");
 
  189                                $this->ctrl->forwardCommand($gui);
 
  191                        case "ilobjstudyprogrammetreegui":
 
  196                                $this->tabs_gui->setTabActive(self::TAB_VIEW_CONTENT);
 
  197                                $this->tabs_gui->setSubTabActive(self::SUBTAB_VIEW_TREE);
 
  200                                $_SESSION[
"il_cont_admin_panel"] = 
false;
 
  203                                $this->ctrl->forwardCommand($gui);
 
  205                        case 'ilstudyprogrammetypegui':
 
  206                                $this->tabs_gui->setTabActive(
'subtypes');
 
  209                                $this->ctrl->forwardCommand($types_gui);
 
  211                        case 'ilobjectcopygui':
 
  212                                $gui = 
new ilobjectcopygui($this);
 
  213                                $this->ctrl->forwardCommand($gui);
 
  228                                                $this->tabs_gui->clearTargets();
 
  229                                                $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTarget($this));
 
  230                                                parent::deleteObject();
 
  232                                        case 'confirmedDelete':
 
  233                                                parent::confirmedDeleteObject();
 
  235                                        case 'editAdvancedSettings':
 
  236                                                $this->tabs_gui->setTabActive(
"settings");
 
  237                                                $this->tabs_gui->setSubTabActive(
'edit_advanced_settings');
 
  241                                        case 'updateAdvancedSettings':
 
  242                                                $this->tabs_gui->setTabActive(
"settings");
 
  243                                                $this->tabs_gui->setSubTabActive(
'edit_advanced_settings');
 
  248                                                $this->ctrl->redirectByClass(
"ilInfoScreenGUI", 
"showSummary");
 
  250                                        case 'getAsynchItemList':
 
  251                                                parent::getAsynchItemListObject();
 
  255                                        case 'confirmRemoveFromSystem':
 
  256                                        case 'removeFromSystem':
 
  322                                                throw new ilException(
"ilObjStudyProgrammeGUI: Command not supported: $cmd");
 
  326                                throw new ilException(
"ilObjStudyProgrammeGUI: Can't forward to next class $next_class");
 
  335                parent::createObject();
 
  345                parent::saveObject();
 
  347                if($this->ctrl->isAsynch()) {
 
  349                        $form->setValuesByPost();
 
  366                parent::cancelCreation();
 
  392                $this->ctrl->setParameter($this, 
"ref_id", $a_new_object->
getRefId());
 
  394                        $this->ctrl->getLinkTarget($this, 
"edit", 
"", 
false, 
false)));
 
  403                $this->tabs_gui->setTabActive(self::TAB_VIEW_CONTENT);
 
  405                parent::renderObject();
 
  415                $form->setFormAction($this->ctrl->getFormAction($this));
 
  416                $form->addCommandButton(
'updateAdvancedSettings', $this->lng->txt(
'save'));
 
  417                $form->addCommandButton(
'editAdvancedSettings', $this->lng->txt(
'cancel'));
 
  426                if (!$this->ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
  428                        $this->ctrl->redirect($this);
 
  432                $gui->setPropertyForm($form);
 
  434                $this->tpl->setContent($form->getHTML());
 
  442                if (!$this->ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
  444                        $this->ctrl->redirect($this);
 
  449                $gui->setPropertyForm($form);
 
  452                if ($gui->importEditFormPostValues()) {
 
  453                        $gui->writeEditForm();
 
  455                        $this->ctrl->redirect($this, 
'editAdvancedSettings');
 
  457                        $this->tpl->setContent($form->getHTML());
 
  470                return array( self::CFORM_NEW => $this->
initCreateForm($a_new_type));
 
  484                $asyncForm->cloneForm($tmp_forms[self::CFORM_NEW]);
 
  485                $asyncForm->setAsync(
true);
 
  495                return $this->ilAccess->checkAccess($a_which, 
"", $this->ref_id);
 
  503                foreach ($a_perms as $perm) {
 
  511                        $this->ctrl->redirectByClass(
'ilinfoscreengui', 
'');
 
  514                $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"), $this->ilias->error_obj->WARNING);
 
  528                $this->help->setScreenIdComponent(
"prg");
 
  530                        $this->tabs_gui->addTab( self::TAB_VIEW_CONTENT
 
  531                                                                   , $this->lng->txt(
"content")
 
  532                                                                   , $this->getLinkTarget(
"view"));
 
  536                        $this->tabs_gui->addTab( self::TAB_INFO
 
  537                                                                   , $this->lng->txt(
"info_short")
 
  538                                                                   , $this->getLinkTarget(
"info_short")
 
  543                        $this->tabs_gui->addTab( self::TAB_SETTINGS
 
  544                                                                   , $this->lng->txt(
"settings")
 
  545                                                                   , $this->getLinkTarget(
"settings")
 
  550                        $this->tabs_gui->addTab( self::TAB_MEMBERS
 
  551                                           , $this->lng->txt(
"members")
 
  552                                           , $this->getLinkTarget(
"members")
 
  564                switch($a_parent_tab) {
 
  569                                        $this->tabs_gui->addSubTab(self::TAB_VIEW_CONTENT, $this->lng->txt(
"view"), $this->getLinkTarget(
"view"));
 
  573                                        $this->tabs_gui->addSubTab(self::SUBTAB_VIEW_TREE, $this->lng->txt(
"cntr_manage"), $this->getLinkTarget(self::SUBTAB_VIEW_TREE));
 
  577                        case 'editAdvancedSettings':
 
  578                                $this->tabs_gui->addSubTab(
'settings', $this->lng->txt(
'settings'), $this->getLinkTarget(
'settings'));
 
  581                                $type = ilStudyProgrammeType::find($this->object->getSubtypeId());
 
  583                                if (!is_null($type) && count($type->getAssignedAdvancedMDRecords(
true))) {
 
  584                                        $this->tabs_gui->addSubTab(
'edit_advanced_settings', $this->lng->txt(
'prg_adv_settings'), $this->ctrl->getLinkTarget($this, 
'editAdvancedSettings'));
 
  608                if ($a_cmd == 
"info_short") {
 
  609                        return $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui", 
"showSummary");
 
  611                if ($a_cmd == 
"settings") {
 
  612                        return $this->ctrl->getLinkTargetByClass(
"ilobjstudyprogrammesettingsgui", 
"view");
 
  614                if($a_cmd == self::SUBTAB_VIEW_TREE) {
 
  615                        return $this->ctrl->getLinkTargetByClass(
"ilobjstudyprogrammetreegui", 
"view");
 
  617                if ($a_cmd == 
"members") {
 
  618                        return $this->ctrl->getLinkTargetByClass(
"ilobjstudyprogrammemembersgui", 
"view");
 
  620                if($a_cmd == 
"subtypes") {
 
  621                        return $this->ctrl->getLinkTargetByClass(
"ilstudyprogrammetypegui", 
"listTypes");
 
  624                return $this->ctrl->getLinkTarget($this, $a_cmd);
 
  634                require_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
 
  635                require_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
 
  636                require_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
 
  637                require_once(
'./Services/ADT/classes/class.ilADTFactory.php');
 
  639                $type = ilStudyProgrammeType::find($this->object->getSubtypeId());
 
  645                $record_gui->setInfoObject($a_info_screen);
 
  646                $record_gui->parse();
 
  653                $this->tabs_gui->setTabActive(self::TAB_SETTINGS);
 
  654                $this->tabs_gui->setSubTabActive(
'settings');
 
  656                require_once(
"Modules/StudyProgramme/classes/class.ilObjStudyProgrammeSettingsGUI.php");
 
  658                $this->ctrl->setCmd(
"view");
 
  659                $this->ctrl->forwardCommand($gui);
 
  668        public static function _goto($a_target) {
 
  673                $id = explode(
"_", $a_target);
 
  674                $ilCtrl->setTargetScript(
"ilias.php");
 
  675                $ilCtrl->initBaseClass(
"ilRepositoryGUI");
 
  676                $ilCtrl->setParameterByClass(
"ilobjstudyprogrammegui", 
"ref_id", $id[0]);
 
  678                $ilCtrl->redirectByClass(array( 
"ilRepositoryGUI", 
"ilobjstudyprogrammegui" ), 
"view");
 
  683                $ilNavigationHistory = 
$DIC[
'ilNavigationHistory'];
 
  686                        $this->ilAccess->checkAccess(
'read', 
'', 
$_GET[
'ref_id']))
 
  688                        $link = $this->ctrl->getLinkTargetByClass(
"ilrepositorygui", 
"frameset");
 
  690                        $ilNavigationHistory->addItem(
$_GET[
'ref_id'],
 
An exception for terminatinating execution or to throw for unit testing.
static handleAsyncOutput($normal_content, $async_content=null, $apply_to_tpl=true)
Handles async output.
static encodeAsyncResponse(array $data=array())
Encode data as json for async output.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
const SORT_NEW_ITEMS_ORDER_CREATION
const SORT_NEW_ITEMS_POSITION_BOTTOM
Base class for ILIAS Exception handling.
Class ilObjStudyProgrammeGUI class.
create()
creates the object
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.
getSubTabs($a_parent_tab)
Adds subtabs based on the parent tab.
cancel()
Cancel the object generation.
updateAdvancedSettings()
Update Advanced Metadata.
executeCommand()
execute command note: this method is overwritten in all container objects
fillInfoScreen($a_info_screen)
Adding meta-data to the info-screen.
getLinkTarget($a_cmd)
Generates a link based on a cmd.
editAdvancedSettings()
Edit Advanced Metadata.
getAsyncCreationForm()
Method for implementing async windows-output Should be moved into core to enable async requests on cr...
getTabs()
Adds the default tabs to the gui.
static _goto($a_target)
_goto Deep link
denyAccessIfNotAnyOf($a_perms)
view()
Default view method.
setContentSubTabs()
Disable default content subtabs.
initCreationForms($a_new_type)
Overwritten from ilObjectGUI since copy and import are not implemented.
afterSave(ilObject $a_new_object)
After save hook Sets the sorting of the container correctly.
Class ilObjStudyProgrammeMembersGUI.
Class ilObjStudyProgrammeSettingsGUI.
Class ilObjStudyProgrammeTreeGUI Generates the manage view for ilTrainingProgramme-Repository objects...
initCreateForm($a_new_type)
Init object creation form.
getReturnLocation($a_cmd, $a_location="")
get return location for command (command is method name without "Object", e.g.
getCreationMode()
get creation mode
Class ilObject Basic functions for all objects.
getRefId()
get reference id @access public
getId()
get object id @access public
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilStudyProgrammeTypeGUI.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
redirection script todo: (a better solution should control the processing via a xml file)