/** * save object * @access public */ function saveObject() { global $rbacadmin; // create and insert forum in objecttree $newObj = parent::saveObject(); // put here object specific stuff // always send a message ilUtil::sendSuccess($this->lng->txt("object_added"), true); exit; }
/** * Import object * @return */ public function importFileObject() { global $lng; if (parent::importFileObject()) { ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true); $this->ctrl->returnToParent($this); } }
public function viewObject() { global $ilCtrl, $ilNavigationHistory, $ilAccess; if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) { $this->ilias->raiseError($this->lng->txt('msg_no_perm_read'), $this->ilias->error_obj->MESSAGE); } // add entry to navigation history if (!$this->getCreationMode() && $ilAccess->checkAccess('read', '', $this->object->getRefId())) { $ilNavigationHistory->addItem($this->object->getRefId(), 'ilias.php?baseClass=ilRepositoryGUI&cmd=view&ref_id=' . $this->object->getRefId(), 'icrs'); } if (strtolower($_GET['baseClass']) == 'iladministrationgui') { parent::viewObject(); return true; } return $this->renderObject(); }
public function __setTableGUIBasicData($tbl, $a_result_set, $a_from, $a_form) { return parent::__setTableGUIBasicData($tbl, $a_result_set, $a_from, $a_form); }
/** * Start linking object */ public function link() { global $tree; $this->ctrl->setReturnByClass(get_class($this->getContainer()), ''); $_GET['ref_id'] = $tree->getParentId((int) $_GET['item_ref_id']); include_once './Services/Container/classes/class.ilContainerGUI.php'; $container = new ilContainerGUI(array(), 0, false, false); $container->linkObject(); return true; }
/** * Edit * * @param * @return */ function editObject() { $this->setSubTabs("settings"); parent::editObject(); }
protected function initCreationForms($a_new_type) { $forms = parent::initCreationForms($a_new_type); //unset($forms[self::CFORM_IMPORT]); return $forms; }
public function saveSortingObject() { if (isset($_POST['position']["lobj"])) { $lobj = $_POST['position']["lobj"]; unset($_POST['position']["lobj"]); $objective_order = array(); foreach ($lobj as $objective_id => $materials) { $objective_order[$objective_id] = $materials[0]; unset($lobj[$objective_id][0]); } // objective order include_once "Modules/Course/classes/class.ilCourseObjective.php"; asort($objective_order); $pos = 0; foreach (array_keys($objective_order) as $objective_id) { $obj = new ilCourseObjective($this->object, $objective_id); $obj->writePosition(++$pos); } // material order include_once "Modules/Course/classes/class.ilCourseObjectiveMaterials.php"; foreach ($lobj as $objective_id => $materials) { $objmat = new ilCourseObjectiveMaterials($objective_id); asort($materials); $pos = 0; foreach (array_keys($materials) as $ass_id) { $objmat->writePosition($ass_id, ++$pos); } } } return parent::saveSortingObject(); }
/** * called by prepare output */ function setTitleAndDescription() { global $lng; parent::setTitleAndDescription(); $this->tpl->setDescription(""); if (!ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title")) { if ($this->object->getTitle() == "ILIAS") { $this->tpl->setTitle($lng->txt("repository")); } else { if ($this->object->getDescription() != "") { $this->tpl->setDescription($this->object->getDescription()); // #13479 } } } }
protected function initHeaderAction($a_sub_type = null, $a_sub_id = null) { global $ilSetting, $ilUser; $lg = parent::initHeaderAction($a_sub_type, $a_sub_id); include_once './Modules/Group/classes/class.ilGroupParticipants.php'; if ($ilSetting->get("crsgrp_ntf") && ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId())) { if (!$ilUser->getPref("grpcrs_ntf_" . $this->ref_id)) { $lg->addHeaderIcon("not_icon", ilUtil::getImagePath("notification_off.png"), $this->lng->txt("grp_notification_deactivated")); $this->ctrl->setParameter($this, "grp_ntf", 1); $caption = "grp_activate_notification"; } else { $lg->addHeaderIcon("not_icon", ilUtil::getImagePath("notification_on.png"), $this->lng->txt("grp_notification_activated")); $this->ctrl->setParameter($this, "grp_ntf", 0); $caption = "grp_deactivate_notification"; } $lg->addCustomCommand($this->ctrl->getLinkTarget($this, "saveNotification"), $caption); $this->ctrl->setParameter($this, "grp_ntf", ""); } return $lg; }
protected function initHeaderAction($a_sub_type = null, $a_sub_id = null) { global $ilSetting, $ilUser; $lg = parent::initHeaderAction($a_sub_type, $a_sub_id); if ($lg && $this->ref_id && ilCourseParticipants::_isParticipant($this->ref_id, $ilUser->getId())) { // certificate include_once "Services/Certificate/classes/class.ilCertificate.php"; if (ilCertificate::isActive() && ilCertificate::isObjectActive($this->object->getId()) && ilCourseParticipants::getDateTimeOfPassed($this->object->getId(), $ilUser->getId())) { $cert_url = $this->ctrl->getLinkTarget($this, "deliverCertificate"); $this->lng->loadLanguageModule("certificate"); $lg->addCustomCommand($cert_url, "download_certificate"); $lg->addHeaderIcon("cert_icon", ilUtil::getImagePath("icon_cert_s.png"), $this->lng->txt("download_certificate"), null, null, $cert_url); } // notification if ($ilSetting->get("crsgrp_ntf")) { if (!$ilUser->getPref("grpcrs_ntf_" . $this->ref_id)) { $lg->addHeaderIcon("not_icon", ilUtil::getImagePath("notification_off.png"), $this->lng->txt("crs_notification_deactivated")); $this->ctrl->setParameter($this, "crs_ntf", 1); $caption = "crs_activate_notification"; } else { $lg->addHeaderIcon("not_icon", ilUtil::getImagePath("notification_on.png"), $this->lng->txt("crs_notification_activated")); $this->ctrl->setParameter($this, "crs_ntf", 0); $caption = "crs_deactivate_notification"; } $lg->addCustomCommand($this->ctrl->getLinkTarget($this, "saveNotification"), $caption); $this->ctrl->setParameter($this, "crs_ntf", ""); } } return $lg; }