本文整理汇总了PHP中ilObjTest::isSkillManagementGloballyActivated方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjTest::isSkillManagementGloballyActivated方法的具体用法?PHP ilObjTest::isSkillManagementGloballyActivated怎么用?PHP ilObjTest::isSkillManagementGloballyActivated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilObjTest
的用法示例。
在下文中一共展示了ilObjTest::isSkillManagementGloballyActivated方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isSkillManagementGloballyActivated
public static function isSkillManagementGloballyActivated()
{
if (self::$isSkillManagementGloballyActivated === null) {
include_once 'Services/Skill/classes/class.ilSkillManagementSettings.php';
$skmgSet = new ilSkillManagementSettings();
self::$isSkillManagementGloballyActivated = $skmgSet->isActivated();
}
return self::$isSkillManagementGloballyActivated;
}
示例2: isAccessDenied
private function isAccessDenied()
{
if (!$this->testOBJ->isSkillServiceEnabled()) {
return true;
}
if (!ilObjTest::isSkillManagementGloballyActivated()) {
return true;
}
if (!$this->access->checkAccess('write', '', $this->refId)) {
return true;
}
return false;
}
示例3: getTabs
//.........这里部分代码省略.........
}
}
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);
}
}
}
示例4: performSaveForm
private function performSaveForm(ilPropertyFormGUI $form)
{
$this->saveGeneralProperties($form);
$this->saveAvailabilityProperties($form);
$this->saveTestIntroProperties($form);
$this->saveTestAccessProperties($form);
$this->saveTestRunProperties($form);
$this->saveQuestionBehaviourProperties($form);
$this->saveTestSequenceSettings($form);
$this->saveTestFinishProperties($form);
if (!$this->testOBJ->participantDataExist()) {
// skill service
if (ilObjTest::isSkillManagementGloballyActivated() && $form->getItemByPostVar('skill_service') instanceof ilFormPropertyGUI) {
$this->testOBJ->setSkillServiceEnabled($form->getItemByPostVar('skill_service')->getChecked());
}
}
// store settings to db
$this->testOBJ->saveToDb(true);
// Update ecs export settings
include_once 'Modules/Test/classes/class.ilECSTestSettings.php';
$ecs = new ilECSTestSettings($this->testOBJ);
$ecs->handleSettingsUpdate();
}