/** * Activate didactic templates * @global ilErrorHandling $ilErr * @global ilCtrl $ilCtrl * @return void */ protected function deactivateTemplates() { global $ilErr, $ilCtrl; if (!$_REQUEST['tpls']) { ilUtil::sendFailure($this->lng->txt('select_one')); return $ilCtrl->redirect($this, 'overview'); } foreach ($_REQUEST['tpls'] as $tplid) { $tpl = new ilDidacticTemplateSetting($tplid); $tpl->enable(false); $tpl->update(); } ilUtil::sendSuccess($this->lng->txt('didactic_deactivated_msg'), true); $ilCtrl->redirect($this, 'overview'); }