本文整理汇总了PHP中ilChangeEvent::_activate方法的典型用法代码示例。如果您正苦于以下问题:PHP ilChangeEvent::_activate方法的具体用法?PHP ilChangeEvent::_activate怎么用?PHP ilChangeEvent::_activate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilChangeEvent
的用法示例。
在下文中一共展示了ilChangeEvent::_activate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testChangeEvent
/**
* change event test
* @param
* @return
*/
public function testChangeEvent()
{
global $ilUser;
include_once './Services/Tracking/classes/class.ilChangeEvent.php';
$ret = ilChangeEvent::_deactivate();
$ret = ilChangeEvent::_activate();
$res = ilChangeEvent::_lookupUncaughtWriteEvents(9, $ilUser->getId());
$res = ilChangeEvent::_lookupChangeState(9, $ilUser->getId());
$res = ilChangeEvent::_lookupInsideChangeState(9, $ilUser->getId());
}
示例2: saveSettings
public function saveSettings()
{
global $ilSetting;
$form = $this->initSettingsForm();
if ($form->checkInput()) {
$ilSetting->set("default_repository_view", $_POST["default_rep_view"]);
$ilSetting->set("repository_tree_pres", $_POST["tree_pres"]);
if ($_POST["tree_pres"] == "") {
$_POST["rep_tree_limit_grp_crs"] = "";
}
if ($_POST["rep_tree_limit_grp_crs"] && !$ilSetting->get("rep_tree_limit_grp_crs")) {
$_POST["rep_tree_synchronize"] = true;
} else {
if (!$_POST["rep_tree_synchronize"] && $ilSetting->get("rep_tree_synchronize")) {
$_POST["rep_tree_limit_grp_crs"] = false;
}
}
$ilSetting->set("rep_tree_limit_grp_crs", $_POST["rep_tree_limit_grp_crs"]);
// $ilSetting->set('rep_cache',(int) $_POST['rep_cache']);
// $ilSetting->set("rep_tree_synchronize", $_POST["rep_tree_synchronize"]);
$ilSetting->set("enable_trash", $_POST["enable_trash"]);
$ilSetting->set("rep_shorten_description", $form->getInput('rep_shorten_description'));
$ilSetting->set("rep_shorten_description_length", (int) $form->getInput('rep_shorten_description_length'));
$ilSetting->set('item_cmd_asynch', (int) $_POST['item_cmd_asynch']);
$ilSetting->set('comments_tagging_in_lists', (int) $_POST['comments_tagging_in_lists']);
$ilSetting->set('comments_tagging_in_lists_tags', (int) $_POST['comments_tagging_in_lists_tags']);
require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
if ($form->getInput('change_event_tracking')) {
ilChangeEvent::_activate();
} else {
ilChangeEvent::_deactivate();
}
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirect($this, "view");
}
$form->setValuesByPost();
$this->view($form);
}
示例3: updateSettings
function updateSettings()
{
global $ilSetting;
$ilSetting->set("enable_tracking", (int) $this->enabledLearningProgress());
$ilSetting->set("save_user_related_data", (int) $this->enabledUserRelatedData());
$ilSetting->set("tracking_time_span", $this->getValidTimeSpan());
$ilSetting->set("lp_extended_data", $this->extended_data);
$ilSetting->set("object_statistics", (int) $this->enabledObjectStatistics());
// $ilSetting->set("lp_desktop", (int)$this->hasLearningProgressDesktop());
$ilSetting->set("lp_learner", (int) $this->hasLearningProgressLearner());
// BEGIN ChangeEvent
require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
if ($this->enabledChangeEventTracking() != ilChangeEvent::_isActive()) {
if ($this->enabledChangeEventTracking()) {
ilChangeEvent::_activate();
} else {
ilChangeEvent::_deactivate();
}
}
// END ChangeEvent
return true;
}