protected function questionsSubtabs($a_cmd) { global $ilTabs; if ($a_cmd == "questions" && $_REQUEST["pgov"]) { $a_cmd = "page"; } $hidden_tabs = array(); $template = $this->object->getTemplate(); if ($template) { include_once "Services/Administration/classes/class.ilSettingsTemplate.php"; $template = new ilSettingsTemplate($template); $hidden_tabs = $template->getHiddenTabs(); } $ilTabs->addSubTab("page", $this->lng->txt("survey_per_page_view"), $this->ctrl->getLinkTargetByClass("ilsurveypagegui", "renderPage")); if (!in_array("survey_question_editor", $hidden_tabs)) { $this->ctrl->setParameter($this, "pgov", ""); $ilTabs->addSubTab("questions", $this->lng->txt("survey_question_editor"), $this->ctrl->getLinkTarget($this, "questions")); $this->ctrl->setParameter($this, "pgov", $_REQUEST["pgov"]); } $ilTabs->addSubTab("print", $this->lng->txt("print_view"), $this->ctrl->getLinkTarget($this, "printView")); if ($this->object->getSurveyPages()) { if ($a_cmd == "page") { $this->ctrl->setParameterByClass("ilsurveyexecutiongui", "pgov", max(1, $_REQUEST["pg"])); } $this->ctrl->setParameterByClass("ilsurveyexecutiongui", "prvw", 1); $ilTabs->addSubTab("preview", $this->lng->txt("preview"), $this->ctrl->getLinkTargetByClass(array("ilobjsurveygui", "ilsurveyexecutiongui"), "preview")); } $ilTabs->activateSubTab($a_cmd); }
/** * Fill table row */ protected function fillRow($a_set) { global $lng, $ilCtrl; $ilCtrl->setParameter($this->parent_obj, "templ_id", $a_set["id"]); $this->tpl->setVariable("VAL_ID", $a_set["id"]); // begin-patch lok $this->tpl->setVariable("VAL_TITLE", ilSettingsTemplate::translate($a_set["title"])); $this->tpl->setVariable("VAL_DESCRIPTION", ilSettingsTemplate::translate($a_set["description"])); // end-patch lok $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit")); $this->tpl->setVariable("HREF_EDIT", $ilCtrl->getLinkTarget($this->parent_obj, "editSettingsTemplate")); $ilCtrl->setParameter($this->parent_obj, "templ_id", ""); }
/** * Constructor */ function __construct($a_parent_obj, $a_parent_cmd, $a_type) { global $ilCtrl, $lng, $ilAccess, $lng; $this->setId("admsettemp" . $a_type); parent::__construct($a_parent_obj, $a_parent_cmd); include_once "./Services/Administration/classes/class.ilSettingsTemplate.php"; $this->setData(ilSettingsTemplate::getAllSettingsTemplates($a_type)); $this->setTitle($lng->txt("adm_settings_templates") . " - " . $lng->txt("obj_" . $a_type)); $this->addColumn("", "", "1", true); $this->addColumn($this->lng->txt("title"), "title"); $this->addColumn($this->lng->txt("description")); $this->addColumn($this->lng->txt("actions")); $this->setFormAction($ilCtrl->getFormAction($a_parent_obj)); $this->setRowTemplate("tpl.settings_template_row.html", "Services/Administration"); $this->addMultiCommand("confirmSettingsTemplateDeletion", $lng->txt("delete")); //$this->addCommandButton("", $lng->txt("")); }
/** * form for new survey object import */ function importFileObject() { global $tpl, $ilErr; $parent_id = $_GET["ref_id"]; $new_type = $_REQUEST["new_type"]; // create permission is already checked in createObject. This check here is done to prevent hacking attempts if (!$this->checkPermissionBool("create", "", $new_type)) { $ilErr->raiseError($this->lng->txt("no_create_permission")); } $this->lng->loadLanguageModule($new_type); $this->ctrl->setParameter($this, "new_type", $new_type); $form = $this->initImportForm($new_type); if ($form->checkInput()) { include_once "./Modules/Survey/classes/class.ilObjSurvey.php"; $newObj = new ilObjSurvey(); $newObj->setType($new_type); $newObj->setTitle("dummy"); $newObj->setDescription("dummy"); $newObj->create(true); $this->putObjectInTree($newObj); // copy uploaded file to import directory $error = $newObj->importObject($_FILES["importfile"], $form->getInput("spl")); if (strlen($error)) { $newObj->delete(); $this->ilias->raiseError($error, $this->ilias->error_obj->MESSAGE); return; } ilUtil::sendSuccess($this->lng->txt("object_imported"), true); ilUtil::redirect("ilias.php?ref_id=" . $newObj->getRefId() . "&baseClass=ilObjSurveyGUI"); // using template? include_once "Services/Administration/classes/class.ilSettingsTemplate.php"; $templates = ilSettingsTemplate::getAllSettingsTemplates("svy"); if ($templates) { global $tpl; $tpl->addJavaScript("./Modules/Scorm2004/scripts/questions/jquery.js"); // $tpl->addJavaScript("./Modules/Scorm2004/scripts/questions/jquery-ui-min.js"); $this->tpl->setCurrentBlock("template_option"); $this->tpl->setVariable("VAL_TEMPLATE_OPTION", ""); $this->tpl->setVariable("TXT_TEMPLATE_OPTION", $this->lng->txt("none")); $this->tpl->parseCurrentBlock(); foreach ($templates as $item) { $this->tpl->setCurrentBlock("template_option"); $this->tpl->setVariable("VAL_TEMPLATE_OPTION", $item["id"]); $this->tpl->setVariable("TXT_TEMPLATE_OPTION", $item["title"]); $this->tpl->parseCurrentBlock(); $desc = str_replace("\n", "", nl2br($item["description"])); $desc = str_replace("\r", "", $desc); $this->tpl->setCurrentBlock("js_data"); $this->tpl->setVariable("JS_DATA_ID", $item["id"]); $this->tpl->setVariable("JS_DATA_TEXT", $desc); $this->tpl->parseCurrentBlock(); } $this->tpl->setCurrentBlock("templates"); $this->tpl->setVariable("TXT_TEMPLATE", $this->lng->txt("svy_settings_template")); $this->tpl->parseCurrentBlock(); } } // display form to correct errors $form->setValuesByPost(); $tpl->setContent($form->getHtml()); }
/** * Delete settings template * * @param * @return */ function deleteSettingsTemplate() { global $ilCtrl, $lng; if (is_array($_POST["tid"])) { foreach ($_POST["tid"] as $i) { $templ = new ilSettingsTemplate($i); $templ->delete(); } } ilUtil::sendSuccess("msg_obj_modified"); $ilCtrl->redirect($this, "listSettingsTemplates"); }
/** * Apply settings template * * @param int $template_id */ function applySettingsTemplate($template_id) { if (!$template_id) { return; } include_once "Services/Administration/classes/class.ilSettingsTemplate.php"; $template = new ilSettingsTemplate($template_id); $template_settings = $template->getSettings(); if ($template_settings) { if ($template_settings["show_question_titles"] !== NULL) { if ($template_settings["show_question_titles"]["value"]) { $this->setShowQuestionTitles(true); } else { $this->setShowQuestionTitles(false); } } if ($template_settings["use_pool"] !== NULL) { if ($template_settings["use_pool"]["value"]) { $this->setPoolUsage(true); } else { $this->setPoolUsage(false); } } if ($template_settings["anonymization_options"]["value"]) { $anon_map = array('personalized' => self::ANONYMIZE_OFF, 'anonymize_with_code' => self::ANONYMIZE_ON, 'anonymize_without_code' => self::ANONYMIZE_FREEACCESS); $this->setAnonymize($anon_map[$template_settings["anonymization_options"]["value"]]); } /* other settings: not needed here * - enabled_end_date * - enabled_start_date * - rte_switch */ } $this->setTemplate($template_id); $this->saveToDb(); }
/** * adds tabs to tab gui object * * @param ilTabsGUI $tabs_gui */ function getTabs(&$tabs_gui) { global $ilAccess, $ilUser, $ilHelp; if (preg_match('/^ass(.*?)gui$/i', $this->ctrl->getNextClass($this))) { return; } else { if ($this->ctrl->getNextClass($this) == 'ilassquestionpagegui') { return; } } $ilHelp->setScreenIdComponent("tst"); $hidden_tabs = array(); $template = $this->object->getTemplate(); if ($template) { include_once "Services/Administration/classes/class.ilSettingsTemplate.php"; $template = new ilSettingsTemplate($template, ilObjAssessmentFolderGUI::getSettingsTemplateConfig()); $hidden_tabs = $template->getHiddenTabs(); } // for local use in this f*****g sledge hammer method $curUserHasWriteAccess = $ilAccess->checkAccess("write", "", $this->ref_id); switch ($this->ctrl->getCmdClass()) { // no tabs .. no subtabs .. during test pass case 'iltestoutputgui': // tab handling happens within GUIs // tab handling happens within GUIs case 'iltestevaluationgui': case 'iltestevalobjectiveorientedgui': return; case 'ilmarkschemagui': case 'ilobjtestsettingsgeneralgui': case 'ilobjtestsettingsscoringresultsgui': if ($curUserHasWriteAccess) { $this->getSettingsSubTabs($hidden_tabs); } break; } if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) { require_once 'Services/Link/classes/class.ilLink.php'; $courseLink = ilLink::_getLink($this->getObjectiveOrientedContainer()->getRefId()); $tabs_gui->setBackTarget($this->lng->txt('back_to_objective_container'), $courseLink); } switch ($this->ctrl->getCmd()) { case "resume": case "previous": case "next": case "summary": case "directfeedback": case "finishTest": case "outCorrectSolution": case "passDetails": case "showAnswersOfUser": case "outUserResultsOverview": case "backFromSummary": case "show_answers": case "setsolved": case "resetsolved": case "confirmFinish": case "outTestSummary": case "outQuestionSummary": case "gotoQuestion": case "selectImagemapRegion": case "confirmSubmitAnswers": case "finalSubmission": case "postpone": case "redirectQuestion": case "outUserPassDetails": case "checkPassword": case "exportCertificate": case "finishListOfAnswers": case "backConfirmFinish": case "showFinalStatement": return; break; /*case "browseForQuestions": case "filter": case "resetFilter": case "resetTextFilter": case "insertQuestions": // #8497: resetfilter is also used in lp if($this->ctrl->getNextClass($this) != "illearningprogressgui") { return $this->getBrowseForQuestionsTab($tabs_gui); } break;*/ /*case "browseForQuestions": case "filter": case "resetFilter": case "resetTextFilter": case "insertQuestions": // #8497: resetfilter is also used in lp if($this->ctrl->getNextClass($this) != "illearningprogressgui") { return $this->getBrowseForQuestionsTab($tabs_gui); } break;*/ case "scoring": case "certificate": case "certificateservice": case "certificateImport": case "certificateUpload": case "certificateEditor": case "certificateDelete": case "certificateSave": case "defaults": case "deleteDefaults": case "addDefaults": case "applyDefaults": case "inviteParticipants": case "searchParticipants": if ($curUserHasWriteAccess && in_array($this->ctrl->getCmdClass(), array('ilobjtestgui', 'ilcertificategui'))) { $this->getSettingsSubTabs($hidden_tabs); } break; case "export": case "print": break; case "statistics": case "eval_a": case "detailedEvaluation": case "outEvaluation": case "singleResults": case "exportEvaluation": case "evalUserDetail": case "passDetails": case "outStatisticsResultsOverview": case "statisticsPassDetails": $this->getStatisticsSubTabs(); break; } if (strcmp(strtolower(get_class($this->object)), "ilobjtest") == 0) { // questions tab if ($ilAccess->checkAccess("write", "", $this->ref_id) && !in_array('assQuestions', $hidden_tabs)) { $force_active = $_GET["up"] != "" || $_GET["down"] != "" ? true : false; if (!$force_active) { if ($_GET["browse"] == 1) { $force_active = true; } } switch ($this->object->getQuestionSetType()) { case ilObjTest::QUESTION_SET_TYPE_FIXED: $target = $this->ctrl->getLinkTargetByClass('iltestexpresspageobjectgui', 'showPage'); break; case ilObjTest::QUESTION_SET_TYPE_RANDOM: $target = $this->ctrl->getLinkTargetByClass('ilTestRandomQuestionSetConfigGUI'); break; case ilObjTest::QUESTION_SET_TYPE_DYNAMIC: $target = $this->ctrl->getLinkTargetByClass('ilObjTestDynamicQuestionSetConfigGUI'); break; } $tabs_gui->addTarget("assQuestions", $target, array("questions", "createQuestion", "randomselect", "back", "createRandomSelection", "cancelRandomSelect", "insertRandomSelection", "removeQuestions", "moveQuestions", "insertQuestionsBefore", "insertQuestionsAfter", "confirmRemoveQuestions", "cancelRemoveQuestions", "executeCreateQuestion", "cancelCreateQuestion", "addQuestionpool", "saveRandomQuestions", "saveQuestionSelectionMode", "print", "addsource", "removesource", "randomQuestions"), "", "", $force_active); } // info tab if ($ilAccess->checkAccess("read", "", $this->ref_id) && !in_array('info_short', $hidden_tabs)) { $tabs_gui->addTarget("info_short", $this->ctrl->getLinkTarget($this, 'infoScreen'), array("infoScreen", "outIntroductionPage", "showSummary", "setAnonymousId", "outUserListOfAnswerPasses", "redirectToInfoScreen")); } // settings tab if ($ilAccess->checkAccess("write", "", $this->ref_id)) { if (!in_array('settings', $hidden_tabs)) { $settingsCommands = array("marks", "showMarkSchema", "addMarkStep", "deleteMarkSteps", "addSimpleMarkSchema", "saveMarks", "certificate", "certificateEditor", "certificateRemoveBackground", "certificateSave", "certificatePreview", "certificateDelete", "certificateUpload", "certificateImport", "scoring", "defaults", "addDefaults", "deleteDefaults", "applyDefaults", "inviteParticipants", "saveFixedParticipantsStatus", "searchParticipants", "addParticipants"); require_once 'Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php'; $reflection = new ReflectionClass('ilObjTestSettingsGeneralGUI'); foreach ($reflection->getConstants() as $name => $value) { if (substr($name, 0, 4) == 'CMD_') { $settingsCommands[] = $value; } } require_once 'Modules/Test/classes/class.ilObjTestSettingsScoringResultsGUI.php'; $reflection = new ReflectionClass('ilObjTestSettingsScoringResultsGUI'); foreach ($reflection->getConstants() as $name => $value) { if (substr($name, 0, 4) == 'CMD_') { $settingsCommands[] = $value; } } $settingsCommands[] = ""; // DO NOT KNOW WHAT THIS IS DOING, BUT IT'S REQUIRED $tabs_gui->addTarget("settings", $this->ctrl->getLinkTargetByClass('ilObjTestSettingsGeneralGUI'), $settingsCommands, array("ilmarkschemagui", "ilobjtestsettingsgeneralgui", "ilobjtestsettingsscoringresultsgui", "ilobjtestgui", "ilcertificategui")); } // skill service if ($this->object->isSkillServiceEnabled() && ilObjTest::isSkillManagementGloballyActivated()) { require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentsGUI.php'; $link = $this->ctrl->getLinkTargetByClass(array('ilTestSkillAdministrationGUI', 'ilAssQuestionSkillAssignmentsGUI'), ilAssQuestionSkillAssignmentsGUI::CMD_SHOW_SKILL_QUEST_ASSIGNS); $tabs_gui->addTarget('tst_tab_competences', $link, array(), array()); } if (!in_array('participants', $hidden_tabs)) { // participants $tabs_gui->addTarget("participants", $this->ctrl->getLinkTarget($this, 'participants'), array("participants", "saveClientIP", "removeParticipant", "showParticipantAnswersForAuthor", "deleteAllUserResults", "cancelDeleteAllUserData", "deleteSingleUserResults", "outParticipantsResultsOverview", "outParticipantsPassDetails", "showPassOverview", "showUserAnswers", "participantsAction", "showDetailedResults", 'timing', 'timingOverview', 'npResetFilter', 'npSetFilter', 'showTimingForm'), ""); } } include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php'; if (ilLearningProgressAccess::checkAccess($this->object->getRefId()) && !in_array('learning_progress', $hidden_tabs)) { $tabs_gui->addTarget('learning_progress', $this->ctrl->getLinkTargetByClass(array('illearningprogressgui'), ''), '', array('illplistofobjectsgui', 'illplistofsettingsgui', 'illearningprogressgui', 'illplistofprogressgui')); } if ($ilAccess->checkAccess("write", "", $this->ref_id) && !in_array('manscoring', $hidden_tabs)) { include_once "./Modules/Test/classes/class.ilObjAssessmentFolder.php"; $scoring = ilObjAssessmentFolder::_getManualScoring(); if (count($scoring)) { // scoring tab $tabs_gui->addTarget("manscoring", $this->ctrl->getLinkTargetByClass('ilTestScoringGUI', 'showManScoringParticipantsTable'), array('showManScoringParticipantsTable', 'applyManScoringParticipantsFilter', 'resetManScoringParticipantsFilter', 'showManScoringParticipantScreen', 'showManScoringByQuestionParticipantsTable', 'applyManScoringByQuestionFilter', 'resetManScoringByQuestionFilter', 'saveManScoringByQuestion'), ''); } } // Scoring Adjustment $setting = new ilSetting('assessment'); $scoring_adjust_active = (bool) $setting->get('assessment_adjustments_enabled', false); if ($ilAccess->checkAccess("write", "", $this->ref_id) && $scoring_adjust_active && !in_array('scoringadjust', $hidden_tabs)) { // scoring tab $tabs_gui->addTarget("scoringadjust", $this->ctrl->getLinkTargetByClass('ilScoringAdjustmentGUI', 'showquestionlist'), array('showquestionlist', 'savescoringfortest', 'adjustscoringfortest'), ''); } if (($ilAccess->checkAccess("tst_statistics", "", $this->ref_id) || $ilAccess->checkAccess("write", "", $this->ref_id)) && !in_array('statistics', $hidden_tabs)) { // statistics tab $tabs_gui->addTarget("statistics", $this->ctrl->getLinkTargetByClass("iltestevaluationgui", "outEvaluation"), array("statistics", "outEvaluation", "exportEvaluation", "detailedEvaluation", "eval_a", "evalUserDetail", "passDetails", "outStatisticsResultsOverview", "statisticsPassDetails", "singleResults"), ""); } if ($ilAccess->checkAccess("write", "", $this->ref_id)) { if (!in_array('history', $hidden_tabs)) { // history $tabs_gui->addTarget("history", $this->ctrl->getLinkTarget($this, 'history'), "history", ""); } if (!in_array('meta_data', $hidden_tabs)) { // meta data $tabs_gui->addTarget("meta_data", $this->ctrl->getLinkTargetByClass('ilmdeditorgui', 'listSection'), "", "ilmdeditorgui"); } if (!in_array('export', $hidden_tabs)) { // export tab $tabs_gui->addTarget("export", $this->ctrl->getLinkTargetByClass('iltestexportgui', ''), '', array('iltestexportgui')); } } if ($ilAccess->checkAccess("edit_permission", "", $this->ref_id) && !in_array('permissions', $hidden_tabs)) { $tabs_gui->addTarget("perm_settings", $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), "perm"), array("perm", "info", "owner"), 'ilpermissiongui'); } } if ($this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken()) { $hideTabs = array('settings', 'manscoring', 'scoringadjust', 'statistics', 'history', 'export'); foreach ($hideTabs as $tabId) { $tabs_gui->removeTab($tabId); } } }
/** * Create plugin specific data * @access public */ public function doCreate() { /** * @var $ilCtrl ilCtrl */ global $ilCtrl; $cmdClass = $ilCtrl->getCmdClass(); if (isset($_POST['tpl_id']) && (int) $_POST['tpl_id'] > 0) { $tpl_id = (int) $_POST['tpl_id']; } else { throw new ilException('no_template_id_given'); } include_once "Services/Administration/classes/class.ilSettingsTemplate.php"; $templates = ilSettingsTemplate::getAllSettingsTemplates("xavc"); foreach ($templates as $template) { if ((int) $template['id'] == $tpl_id) { $template_settings = array(); if ($template['id']) { $objTemplate = new ilSettingsTemplate($template['id']); $template_settings = $objTemplate->getSettings(); } } } // reuse existing ac-room if (isset($_POST['creation_type']) && $_POST['creation_type'] == 'existing_vc' && $template_settings['reuse_existing_rooms']['hide'] == '0') { // 1. the sco-id will be assigned to this new ilias object $sco_id = (int) $_POST['available_rooms']; try { $this->useExistingVC($this->getId(), $sco_id); } catch (ilException $e) { $this->creationRollback(); throw new ilException($this->txt($e->getMessage())); } return; } if (strlen($_POST['instructions']) > 0) { $post_instructions = (string) $_POST['instructions']; } else { if (strlen($_POST['instructions_2']) > 0) { $post_instructions = (string) $_POST['instructions_2']; } else { if (strlen($_POST['instructions_3']) > 0) { $post_instructions = (string) $_POST['instructions_3']; } } } if (strlen($_POST['contact_info']) > 0) { $post_contact = (string) $_POST['contact_info']; } else { if (strlen($_POST['contact_info_2']) > 0) { $post_contact = (string) $_POST['contact_info_2']; } else { if (strlen($_POST['contact_info_3']) > 0) { $post_contact = (string) $_POST['contact_info_3']; } } } $this->setInstructions($post_instructions); $this->setContactInfo($post_contact); if (isset($_POST['time_type_selection']) && $_POST['time_type_selection'] == 'permanent_room') { $this->setPermanentRoom(1); } else { if (!isset($_POST['time_type_selection']) && ilAdobeConnectServer::getSetting('default_perm_room') == 1) { $this->setPermanentRoom(1); } else { $this->setPermanentRoom(0); } } if (isset($_POST['access_level'])) { $this->setPermission($_POST['access_level']); } else { $this->setPermission(ilObjAdobeConnect::ACCESS_LEVEL_PROTECTED); } $this->pluginObj->includeClass('class.ilXAVCPermissions.php'); $this->setReadContents(ilXAVCPermissions::lookupPermission(AdobeConnectPermissions::PERM_READ_CONTENTS, 'view')); $this->setReadRecords(ilXAVCPermissions::lookupPermission(AdobeConnectPermissions::PERM_READ_RECORDS, 'view')); $this->externalLogin = $this->checkExternalUser(); $folder_id = $this->getFolderIdByLogin($this->externalLogin); $this->setFolderId($folder_id); if ($cmdClass == 'ilobjectcopygui') { $now = new ilDateTime(time(), IL_CAL_UNIX); $this->start_date = new ilDateTime($now->getUnixTime() - 7200, IL_CAL_UNIX); $this->duration = array('hours' => 1, 'minutes' => 0); $this->publishCreationAC($this->getId(), $this->getTitle(), $this->getDescription(), $this->getStartDate(), $this->getEnddate(), $this->getInstructions(), $this->getContactInfo(), $this->getPermanentRoom(), $this->getPermission(), $this->getReadContents(), $this->getReadRecords(), $this->getFolderId()); return; } try { if (isset($_POST['start_date']) && $template_settings['start_date']['hide'] == '0') { //start_date $this->start_date = new ilDateTime($_POST['start_date']['date'] . ' ' . $_POST['start_date']['time'], IL_CAL_DATETIME); } else { $this->start_date = new ilDateTime(time() + 120, IL_CAL_UNIX); } // duration if (isset($_POST['duration']['hh']) && isset($_POST['duration']['mm']) && ($_POST['duration']['hh'] > 0 || $_POST['duration']['mm'] > 0) && $template_settings['duration']['hide'] == '0') { $this->duration = array('hours' => $_POST['duration']['hh'], 'minutes' => $_POST['duration']['mm']); } else { $this->duration = array('hours' => (int) $template_settings['duration']['value'], 'minutes' => 0); } //end_date $this->end_date = $this->getEnddate(); $concurrent_vc = count($this->checkConcurrentMeetingDates()); $max_rep_obj_vc = ilAdobeConnectServer::getSetting('ac_interface_objects'); if ((int) $max_rep_obj_vc > 0 && $concurrent_vc >= $max_rep_obj_vc) { throw new ilException('xavc_reached_number_of_connections'); } $this->publishCreationAC($this->getId(), $this->getTitle(), $this->getDescription(), $this->getStartDate(), $this->getEnddate(), $this->getInstructions(), $this->getContactInfo(), $this->getPermanentRoom(), $this->getPermission(), $this->getReadContents(), $this->getReadRecords(), $this->getFolderId()); } catch (ilException $e) { $this->creationRollback(); throw new ilException($this->txt($e->getMessage())); } }
/** * Save object * @access public */ public function save() { /** * @var $rbacsystem $rbacsystem * @var $lng $lng * @var $objDefinition ilObjectDefinition */ global $rbacsystem, $objDefinition, $lng; $new_type = $_POST["new_type"] ? $_POST["new_type"] : $_GET["new_type"]; // create permission is already checked in createObject. This check here is done to prevent hacking attempts if (!$rbacsystem->checkAccess("create", (int) $_GET["ref_id"], $new_type)) { $this->ilias->raiseError($this->lng->txt("no_create_permission"), $this->ilias->error_obj->MESSAGE); } $this->ctrl->setParameter($this, "new_type", $new_type); if (isset($_POST['tpl_id']) && (int) $_POST['tpl_id'] > 0) { $tpl_id = (int) $_POST['tpl_id']; } else { $this->ilias->raiseError($this->lng->txt("no_template_id_given"), $this->ilias->error_obj->MESSAGE); } include_once "Services/Administration/classes/class.ilSettingsTemplate.php"; $templates = ilSettingsTemplate::getAllSettingsTemplates("xavc"); foreach ($templates as $template) { if ($template['id'] == $tpl_id) { $form = $this->initCreateForm($template); $selected_template = $template; $template_settings = array(); if ($template['id']) { $objTemplate = new ilSettingsTemplate($template['id']); $template_settings = $objTemplate->getSettings(); } } } if ($form->checkInput()) { if ($form->getInput('creation_type') == 'existing_vc' && $template_settings['reuse_existing_rooms']['hide'] == '0') { try { $location = $objDefinition->getLocation($new_type); $this->pluginObj->includeClass('class.ilAdobeConnectUserUtil.php'); $ilAdobeConnectUser = new ilAdobeConnectUserUtil($this->user->getId()); $xavc_login = $ilAdobeConnectUser->getXAVCLogin(); $folder_id = $ilAdobeConnectUser->ensureUserFolderExistance($xavc_login); $sco_ids = ilObjAdobeConnect::getScosByFolderId($folder_id); $title = $sco_ids[$form->getInput('available_rooms')]['sco_name']; $description = $sco_ids[$form->getInput('available_rooms')]['description']; // create and insert object in objecttree $class_name = "ilObj" . $objDefinition->getClassName($new_type); include_once $location . "/class." . $class_name . ".php"; /** @var $newObj ilObjAdobeConnect */ $newObj = new $class_name(); $newObj->setType($new_type); $newObj->setTitle(ilUtil::stripSlashes($title)); $newObj->setDescription(ilUtil::stripSlashes($description)); $newObj->create(); $newObj->createReference(); $newObj->putInTree($_GET["ref_id"]); $newObj->setPermissions($_GET["ref_id"]); ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true); $this->afterSave($newObj); return; } catch (Exception $e) { ilUtil::sendFailure($e->getMessage(), true); } } else { global $ilUser; $owner = $ilUser->getId(); if (strlen($form->getInput('owner')) > 1) { if (ilObjUser::_lookupId($form->getInput('owner')) > 0) { $owner = ilObjUser::_lookupId($form->getInput('owner')); } else { ilUtil::sendFailure($this->lng->txt('user_not_found')); $owner = 0; } } if ($template_settings['duration']['hide'] == '1') { $durationValid = true; } else { if ($form->getInput('time_type_selection') == 'permanent_room' && ilAdobeConnectServer::getSetting('enable_perm_room', '1')) { $duration['hh'] = 2; $duration['mm'] = 0; } else { $duration = $form->getInput("duration"); } if ($duration['hh'] * 60 + $duration['mm'] < 10) { $form->getItemByPostVar('duration')->setAlert($this->pluginObj->txt('min_duration_error')); $durationValid = false; } else { $durationValid = true; } } if ($template_settings['start_date']['hide'] == '1') { $time_mismatch = false; } else { if ($durationValid) { require_once dirname(__FILE__) . '/class.ilAdobeConnectServer.php'; $serverConfig = ilAdobeConnectServer::_getInstance(); $minTime = new ilDateTime(time() + $serverConfig->getScheduleLeadTime() * 60 * 60, IL_CAL_UNIX); $newStartDate = $form->getItemByPostVar("start_date")->getDate(); $time_mismatch = false; if (ilDateTime::_before($newStartDate, $minTime) && $form->getInput('time_type_selection') != 'permanent_room') { ilUtil::sendFailure(sprintf($this->pluginObj->txt('xavc_lead_time_mismatch_create'), ilDatePresentation::formatDate($minTime)), true); $time_mismatch = true; } } } if (!$time_mismatch && $owner > 0) { try { if ($durationValid) { $location = $objDefinition->getLocation($new_type); // create and insert object in objecttree $class_name = "ilObj" . $objDefinition->getClassName($new_type); include_once $location . "/class." . $class_name . ".php"; /** @var $newObj ilObjAdobeConnect */ $newObj = new $class_name(); $newObj->setType($new_type); $newObj->setTitle(ilUtil::stripSlashes($_POST["title"])); $newObj->setDescription(ilUtil::stripSlashes($_POST["desc"])); $newObj->setOwner($owner); $newObj->create(); $newObj->createReference(); $newObj->putInTree($_GET["ref_id"]); $newObj->setPermissions($_GET["ref_id"]); ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true); $this->afterSave($newObj); return; } } catch (Exception $e) { ilUtil::sendFailure($e->getMessage(), true); } } } $form->setValuesByPost(); if (ilAdobeConnectServer::getSetting('show_free_slots')) { $this->showCreationForm($form); } else { $this->tpl->setContent($form->getHtml()); } } else { $form->setValuesByPost(); $this->tpl->setContent($form->getHTML()); return; } }
/** * Apply auto generated setttings template * @param ilObjTest $tst */ protected function applySettingsTemplate(ilObjTest $tst) { include_once "Services/Administration/classes/class.ilSettingsTemplate.php"; include_once './Modules/Test/classes/class.ilObjAssessmentFolderGUI.php'; $tpl_id = 0; foreach (ilSettingsTemplate::getAllSettingsTemplates('tst', true) as $nr => $template) { switch ($this->getTestType()) { case self::TEST_TYPE_IT: if ($template['title'] == self::SETTINGS_TEMPLATE_IT) { $tpl_id = $template['id']; } break; case self::TEST_TYPE_QT: if ($template['title'] == self::SETTINGS_TEMPLATE_QT) { $tpl_id = $template['id']; } break; } if ($tpl_id) { break; } } if (!$tpl_id) { return false; } include_once "Services/Administration/classes/class.ilSettingsTemplate.php"; include_once './Modules/Test/classes/class.ilObjAssessmentFolderGUI.php'; $template = new ilSettingsTemplate($tpl_id, ilObjAssessmentFolderGUI::getSettingsTemplateConfig()); $template_settings = $template->getSettings(); if ($template_settings) { include_once './Modules/Test/classes/class.ilObjTestGUI.php'; $tst_gui = new ilObjTestGUI(); $tst_gui->applyTemplate($template_settings, $tst); } $tst->setTemplate($tpl_id); return true; }
/** * adds tabs to tab gui object * * @param object $tabs_gui ilTabsGUI object */ function getTabs(&$tabs_gui) { global $ilAccess, $ilUser, $ilHelp; if (preg_match('/^ass(.*?)gui$/i', $this->ctrl->getNextClass($this))) { return; } else { if ($this->ctrl->getNextClass($this) == 'ilpageobjectgui') { return; } } $ilHelp->setScreenIdComponent("tst"); $hidden_tabs = array(); $template = $this->object->getTemplate(); if ($template) { include_once "Services/Administration/classes/class.ilSettingsTemplate.php"; $template = new ilSettingsTemplate($template, ilObjAssessmentFolderGUI::getSettingsTemplateConfig()); $hidden_tabs = $template->getHiddenTabs(); } if ($this->ctrl->getNextClass($this) == 'iltestoutputgui') { return; } switch ($this->ctrl->getCmd()) { case "resume": case "previous": case "next": case "summary": case "directfeedback": case "finishTest": case "outCorrectSolution": case "passDetails": case "showAnswersOfUser": case "outUserResultsOverview": case "backFromSummary": case "show_answers": case "setsolved": case "resetsolved": case "confirmFinish": case "outTestSummary": case "outQuestionSummary": case "gotoQuestion": case "selectImagemapRegion": case "confirmSubmitAnswers": case "finalSubmission": case "postpone": case "redirectQuestion": case "outUserPassDetails": case "checkPassword": case "exportCertificate": case "finishListOfAnswers": case "backConfirmFinish": case "showFinalStatement": return; break; case "browseForQuestions": case "filter": case "resetFilter": case "resetTextFilter": case "insertQuestions": // #8497: resetfilter is also used in lp if ($this->ctrl->getNextClass($this) != "illearningprogressgui") { return $this->getBrowseForQuestionsTab($tabs_gui); } break; case "scoring": case "properties": case "marks": case "saveMarks": case "cancelMarks": case "addMarkStep": case "deleteMarkSteps": case "addSimpleMarkSchema": case "certificate": case "certificateservice": case "certificateImport": case "certificateUpload": case "certificateEditor": case "certificateDelete": case "certificateSave": case "defaults": case "deleteDefaults": case "addDefaults": case "applyDefaults": case "inviteParticipants": case "searchParticipants": case "": if ($ilAccess->checkAccess("write", "", $this->ref_id) && (strcmp($this->ctrl->getCmdClass(), "ilobjtestgui") == 0 || strcmp($this->ctrl->getCmdClass(), "ilcertificategui") == 0 || strlen($this->ctrl->getCmdClass()) == 0)) { $this->getSettingsSubTabs($hidden_tabs); } break; case "export": case "print": break; case "statistics": case "eval_a": case "detailedEvaluation": case "outEvaluation": case "singleResults": case "exportEvaluation": case "evalUserDetail": case "passDetails": case "outStatisticsResultsOverview": case "statisticsPassDetails": $this->getStatisticsSubTabs(); break; } if (strcmp(strtolower(get_class($this->object)), "ilobjtest") == 0) { // questions tab if ($ilAccess->checkAccess("write", "", $this->ref_id) && !in_array('assQuestions', $hidden_tabs)) { $force_active = $_GET["up"] != "" || $_GET["down"] != "" ? true : false; if (!$force_active) { if ($_GET["browse"] == 1) { $force_active = true; } if (preg_match("/deleteqpl_\\d+/", $this->ctrl->getCmd())) { $force_active = true; } } if ($this->object->isRandomTest()) { $target = $this->ctrl->getLinkTarget($this, 'questions'); } else { $target = $this->ctrl->getLinkTargetByClass('iltestexpresspageobjectgui', 'showPage'); } $tabs_gui->addTarget("assQuestions", $target, array("questions", "browseForQuestions", "questionBrowser", "createQuestion", "randomselect", "filter", "resetFilter", "insertQuestions", "back", "createRandomSelection", "cancelRandomSelect", "insertRandomSelection", "removeQuestions", "moveQuestions", "insertQuestionsBefore", "insertQuestionsAfter", "confirmRemoveQuestions", "cancelRemoveQuestions", "executeCreateQuestion", "cancelCreateQuestion", "addQuestionpool", "saveRandomQuestions", "saveQuestionSelectionMode", "print", "addsource", "removesource", "randomQuestions"), "", "", $force_active); } // info tab if ($ilAccess->checkAccess("visible", "", $this->ref_id) && !in_array('info_short', $hidden_tabs)) { $tabs_gui->addTarget("info_short", $this->ctrl->getLinkTarget($this, 'infoScreen'), array("infoScreen", "outIntroductionPage", "showSummary", "setAnonymousId", "outUserListOfAnswerPasses", "redirectToInfoScreen")); } // settings tab if ($ilAccess->checkAccess("write", "", $this->ref_id)) { if (!in_array('settings', $hidden_tabs)) { $tabs_gui->addTarget("settings", $this->ctrl->getLinkTarget($this, 'properties'), array("properties", "saveProperties", "cancelProperties", "marks", "addMarkStep", "deleteMarkSteps", "addSimpleMarkSchema", "saveMarks", "cancelMarks", "certificate", "certificateEditor", "certificateRemoveBackground", "certificateSave", "certificatePreview", "certificateDelete", "certificateUpload", "certificateImport", "scoring", "defaults", "addDefaults", "deleteDefaults", "applyDefaults", "inviteParticipants", "saveFixedParticipantsStatus", "searchParticipants", "addParticipants", ""), array("", "ilobjtestgui", "ilcertificategui")); } if (!in_array('participants', $hidden_tabs)) { // participants $tabs_gui->addTarget("participants", $this->ctrl->getLinkTarget($this, 'participants'), array("participants", "saveClientIP", "removeParticipant", "showParticipantAnswersForAuthor", "deleteAllUserResults", "cancelDeleteAllUserData", "deleteSingleUserResults", "outParticipantsResultsOverview", "outParticipantsPassDetails", "showPassOverview", "showUserAnswers", "participantsAction", "showDetailedResults"), ""); } } include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php'; if (ilLearningProgressAccess::checkAccess($this->object->getRefId()) && !in_array('learning_progress', $hidden_tabs)) { $tabs_gui->addTarget('learning_progress', $this->ctrl->getLinkTargetByClass(array('illearningprogressgui'), ''), '', array('illplistofobjectsgui', 'illplistofsettingsgui', 'illearningprogressgui', 'illplistofprogressgui')); } if ($ilAccess->checkAccess("write", "", $this->ref_id) && !in_array('manscoring', $hidden_tabs)) { include_once "./Modules/Test/classes/class.ilObjAssessmentFolder.php"; $scoring = ilObjAssessmentFolder::_getManualScoring(); if (count($scoring)) { // scoring tab $tabs_gui->addTarget("manscoring", $this->ctrl->getLinkTargetByClass('ilTestScoringGUI', 'showManScoringParticipantsTable'), array('showManScoringParticipantsTable', 'applyManScoringParticipantsFilter', 'resetManScoringParticipantsFilter', 'showManScoringParticipantScreen'), ''); } } if (($ilAccess->checkAccess("tst_statistics", "", $this->ref_id) || $ilAccess->checkAccess("write", "", $this->ref_id)) && !in_array('statistics', $hidden_tabs)) { // statistics tab $tabs_gui->addTarget("statistics", $this->ctrl->getLinkTargetByClass("iltestevaluationgui", "outEvaluation"), array("statistics", "outEvaluation", "exportEvaluation", "detailedEvaluation", "eval_a", "evalUserDetail", "passDetails", "outStatisticsResultsOverview", "statisticsPassDetails", "singleResults"), ""); } if ($ilAccess->checkAccess("write", "", $this->ref_id)) { if (!in_array('history', $hidden_tabs)) { // history $tabs_gui->addTarget("history", $this->ctrl->getLinkTarget($this, 'history'), "history", ""); } if (!in_array('meta_data', $hidden_tabs)) { // meta data $tabs_gui->addTarget("meta_data", $this->ctrl->getLinkTargetByClass('ilmdeditorgui', 'listSection'), "", "ilmdeditorgui"); } if (!in_array('export', $hidden_tabs)) { // export tab $tabs_gui->addTarget("export", $this->ctrl->getLinkTarget($this, 'export'), array("export", "createExportFile", "confirmDeleteExportFile", "downloadExportFile", "deleteExportFile", "cancelDeleteExportFile"), ""); } } if ($ilAccess->checkAccess("edit_permission", "", $this->ref_id) && !in_array('permissions', $hidden_tabs)) { $tabs_gui->addTarget("perm_settings", $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), "perm"), array("perm", "info", "owner"), 'ilpermissiongui'); } } }
public function initIliasSettingsForm() { /** * @var $ilCtrl ilCtrl */ global $lng, $ilCtrl; include_once './Services/Form/classes/class.ilPropertyFormGUI.php'; $this->form = new ilPropertyFormGUI(); $this->form->setFormAction($ilCtrl->getFormAction($this, 'saveIliasSettings')); $this->form->setTitle($this->getPluginObject()->txt('general_settings')); $this->form->addCommandButton('saveIliasSettings', $lng->txt('save')); $this->form->addCommandButton('cancelIliasSettings', $lng->txt('cancel')); $cb_group = new ilCheckboxGroupInputGUI($this->pluginObj->txt('object_creation_settings'), 'obj_creation_settings'); include_once "Services/Administration/classes/class.ilSettingsTemplate.php"; $templates = ilSettingsTemplate::getAllSettingsTemplates("xavc"); if ($templates) { foreach ($templates as $item) { $cb_simple = new ilCheckboxOption($this->pluginObj->txt($item["title"]), $item["id"]); $cb_group->addOption($cb_simple); } } $cb_group->setInfo($this->pluginObj->txt('template_info')); $this->form->addItem($cb_group); $obj_title_suffix = new ilCheckboxInputGUI($this->pluginObj->txt('obj_title_suffix'), 'obj_title_suffix'); $obj_title_suffix->setInfo($this->pluginObj->txt('obj_title_suffix_info')); $this->form->addItem($obj_title_suffix); $crs_grp_trigger = new ilCheckboxInputGUI($this->pluginObj->txt('allow_crs_grp_trigger'), 'allow_crs_grp_trigger'); $crs_grp_trigger->setInfo($this->pluginObj->txt('allow_crs_grp_trigger_info')); $this->form->addItem($crs_grp_trigger); $show_free_slots = new ilCheckboxInputGUI($this->pluginObj->txt('show_free_slots'), 'show_free_slots'); $show_free_slots->setInfo($this->pluginObj->txt('show_free_slots_info')); $this->form->addItem($show_free_slots); $enable_perm_room = new ilCheckboxInputGUI($this->pluginObj->txt('enable_perm_room'), 'enable_perm_room'); $enable_perm_room->setInfo($this->pluginObj->txt('enable_perm_room_info')); $default_perm_room = new ilCheckboxInputGUI($this->pluginObj->txt('default_perm_room'), 'default_perm_room'); $default_perm_room->setInfo($this->pluginObj->txt('default_perm_room_info')); $enable_perm_room->addSubItem($default_perm_room); $this->form->addItem($enable_perm_room); $add_to_desktop = new ilCheckboxInputGUI($this->pluginObj->txt('add_to_desktop'), 'add_to_desktop'); $add_to_desktop->setInfo($this->pluginObj->txt('add_to_desktop_info')); $this->form->addItem($add_to_desktop); $content_file_types = new ilTextInputGUI($this->pluginObj->txt('content_file_types'), 'content_file_types'); $content_file_types->setRequired(true); $content_file_types->setInfo($this->pluginObj->txt('content_file_types_info')); $this->form->addItem($content_file_types); $user_folders = new ilCheckboxInputGUI($this->pluginObj->txt('use_user_folders'), 'use_user_folders'); $user_folders->setInfo($this->pluginObj->txt('use_user_folders_info')); if (ilAdobeConnectServer::getSetting('user_assignment_mode') == ilAdobeConnectServer::ASSIGN_USER_DFN_EMAIL) { $user_folders->setDisabled(true); } $this->form->addItem($user_folders); $xavc_options = array("host" => $this->pluginObj->txt("presenter"), "mini-host" => $this->pluginObj->txt("moderator"), "view" => $this->pluginObj->txt("participant"), "denied" => $this->pluginObj->txt('denied')); $mapping_crs = new ilNonEditableValueGUI($this->pluginObj->txt('default_crs_mapping'), 'default_crs_mapping'); // $crs_owner = new ilSelectInputGUI($lng->txt('owner'), 'crs_owner'); // $crs_owner->setOptions($xavc_options); // $mapping_crs->addSubItem($crs_owner); $crs_admin = new ilSelectInputGUI($lng->txt('il_crs_admin'), 'crs_admin'); $crs_admin->setOptions($xavc_options); $mapping_crs->addSubItem($crs_admin); $crs_tutor = new ilSelectInputGUI($lng->txt('il_crs_tutor'), 'crs_tutor'); $crs_tutor->setOptions($xavc_options); $mapping_crs->addSubItem($crs_tutor); $crs_member = new ilSelectInputGUI($lng->txt('il_crs_member'), 'crs_member'); $crs_member->setOptions($xavc_options); $mapping_crs->addSubItem($crs_member); $this->form->addItem($mapping_crs); $mapping_grp = new ilNonEditableValueGUI($this->pluginObj->txt('default_grp_mapping'), 'default_grp_mapping'); // $grp_owner = new ilSelectInputGUI($lng->txt('owner'), 'grp_owner'); // $grp_owner->setOptions($xavc_options); // $mapping_grp->addSubItem($grp_owner); $grp_admin = new ilSelectInputGUI($lng->txt('il_grp_admin'), 'grp_admin'); $grp_admin->setOptions($xavc_options); $mapping_grp->addSubItem($grp_admin); $grp_member = new ilSelectInputGUI($lng->txt('il_grp_member'), 'grp_member'); $grp_member->setOptions($xavc_options); $mapping_grp->addSubItem($grp_member); $this->form->addItem($mapping_grp); $ac_permissions = ilXAVCPermissions::getPermissionsArray(); //@todo nahmad: in Template auslagern! $tbl = "<table width='100%' >\n\t\t<tr>\n\t\t<td> </td> \n\t\t<td>" . $this->pluginObj->txt('presenter') . "</td>\n\t\t<td>" . $this->pluginObj->txt('moderator') . "</td>\n\t\t<td>" . $this->pluginObj->txt('participant') . "</td>\n\t\t<td>" . $this->pluginObj->txt('denied') . "</td>\n\t\t\n\t\t</tr>"; foreach ($ac_permissions as $ac_permission => $ac_roles) { $tbl .= "<tr> <td>" . $this->pluginObj->txt($ac_permission) . "</td>"; foreach ($ac_roles as $ac_role => $ac_access) { $tbl .= "<td>"; $tbl .= ilUtil::formCheckbox((bool) $ac_access, 'permissions[' . $ac_permission . '][' . $ac_role . ']', $ac_role, false); $tbl .= "</td>"; } $tbl .= "</tr>"; } $tbl .= "</table>"; $matrix = new ilCustomInputGUI($this->pluginObj->txt('ac_permissions'), ''); $matrix->setHtml($tbl); $this->form->addItem($matrix); }
/** * adds tabs to tab gui object * * @param object $tabs_gui ilTabsGUI object */ function getTabs(&$tabs_gui) { global $ilAccess, $ilUser, $ilHelp; $ilHelp->setScreenIdComponent("svy"); if (strcmp($this->ctrl->getNextClass(), 'ilrepositorysearchgui') != 0) { switch ($this->ctrl->getCmd()) { case "browseForQuestions": case "browseForQuestionblocks": case "insertQuestions": case "filterQuestions": case "resetFilterQuestions": case "changeDatatype": case "start": case "resume": case "next": case "previous": case "redirectQuestion": case "preview": return; case "evaluation": case "checkEvaluationAccess": case "evaluationdetails": case "evaluationuser": $this->setEvalSubtabs(); break; } } $hidden_tabs = array(); $template = $this->object->getTemplate(); if ($template) { include_once "Services/Administration/classes/class.ilSettingsTemplate.php"; $template = new ilSettingsTemplate($template); $hidden_tabs = $template->getHiddenTabs(); } // questions if ($ilAccess->checkAccess("write", "", $this->ref_id)) { $force_active = $_GET["up"] != "" || $_GET["down"] != "" ? true : false; $cmd = $this->ctrl->getLinkTargetByClass("ilsurveypagegui", "renderPage"); // $cmd = $this->ctrl->getLinkTarget($this, "questions"); $tabs_gui->addTarget("survey_questions", $cmd, array("questions", "browseForQuestions", "createQuestion", "filterQuestions", "resetFilterQuestions", "changeDatatype", "insertQuestions", "removeQuestions", "cancelRemoveQuestions", "confirmRemoveQuestions", "defineQuestionblock", "saveDefineQuestionblock", "cancelDefineQuestionblock", "unfoldQuestionblock", "moveQuestions", "insertQuestionsBefore", "insertQuestionsAfter", "saveObligatory", "addHeading", "saveHeading", "cancelHeading", "editHeading", "confirmRemoveHeading", "cancelRemoveHeading", "printView", "renderPage", "addQuestionToolbarForm", "deleteBlock", "movePageForm", "copyQuestionsToPool"), "", "", $force_active); } if ($ilAccess->checkAccess("visible", "", $this->ref_id)) { $tabs_gui->addTarget("info_short", $this->ctrl->getLinkTarget($this, 'infoScreen'), array("infoScreen", "showSummary")); } // properties if ($ilAccess->checkAccess("write", "", $this->ref_id)) { $force_active = $this->ctrl->getCmd() == "" ? true : false; $tabs_gui->addTarget("settings", $this->ctrl->getLinkTarget($this, 'properties'), array("properties", "save", "cancel", 'saveProperties'), "", "", $force_active); } // questions if ($ilAccess->checkAccess("write", "", $this->ref_id) && !in_array("constraints", $hidden_tabs)) { // constraints $tabs_gui->addTarget("constraints", $this->ctrl->getLinkTarget($this, "constraints"), array("constraints", "constraintStep1", "constraintStep2", "constraintStep3", "constraintsAdd", "createConstraints", "editPrecondition"), ""); } // #6969 if ($ilAccess->checkAccess("invite", "", $this->ref_id) && !in_array("invitation", $hidden_tabs)) { // invite $tabs_gui->addTarget("invitation", $this->ctrl->getLinkTarget($this, 'invite'), array("invite", "saveInvitationStatus", "inviteUserGroup", "disinviteUserGroup"), ""); } if ($ilAccess->checkAccess("write", "", $this->ref_id)) { // maintenance $tabs_gui->addTarget("maintenance", $this->ctrl->getLinkTarget($this, 'maintenance'), array("maintenance", "deleteAllUserData"), ""); if ($this->object->getAnonymize() == 1 || $this->object->isAccessibleWithCodeForAll()) { // code $tabs_gui->addTarget("codes", $this->ctrl->getLinkTarget($this, 'codes'), array("codes", "exportCodes", 'codesMail', 'saveMailTableFields', 'importExternalMailRecipients', 'mailCodes', 'sendCodesMail', 'importExternalRecipientsFromFile', 'importExternalRecipientsFromText', 'importExternalRecipientsFromDataset', 'insertSavedMessage', 'deleteSavedMessage'), ""); } } include_once "./Modules/Survey/classes/class.ilObjSurveyAccess.php"; if ($ilAccess->checkAccess("write", "", $this->ref_id) || ilObjSurveyAccess::_hasEvaluationAccess($this->object->getId(), $ilUser->getId())) { // evaluation $tabs_gui->addTarget("svy_evaluation", $this->ctrl->getLinkTargetByClass("ilsurveyevaluationgui", "evaluation"), array("evaluation", "checkEvaluationAccess", "evaluationdetails", "evaluationuser"), ""); } if ($ilAccess->checkAccess("write", "", $this->ref_id)) { if (!in_array("meta_data", $hidden_tabs)) { // meta data $tabs_gui->addTarget("meta_data", $this->ctrl->getLinkTargetByClass('ilmdeditorgui', 'listSection'), "", "ilmdeditorgui"); } if (!in_array("export", $hidden_tabs)) { // export $tabs_gui->addTarget("export", $this->ctrl->getLinkTarget($this, 'export'), array("export", "createExportFile", "confirmDeleteExportFile", "downloadExportFile"), ""); } } if ($ilAccess->checkAccess("edit_permission", "", $this->ref_id)) { // permissions $tabs_gui->addTarget("perm_settings", $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), "perm"), array("perm", "info", "owner"), 'ilpermissiongui'); } }
/** * Lookup title * * @param * @return */ static function lookupTitle($a_id) { return ilSettingsTemplate::lookupProperty($a_id, "title"); }