Пример #1
0
 /**
  *
  */
 protected function afterUpdate()
 {
     // check if template is changed
     include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
     $current_tpl_id = (int) ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
     $new_tpl_id = (int) $this->getDidacticTemplateVar('dtpl');
     if ($new_tpl_id != $current_tpl_id) {
         $_REQUEST['tplid'] = $new_tpl_id;
         // redirect to didactic template confirmation
         include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
         $this->ctrl->setReturn($this, 'edit');
         $this->ctrl->setCmdClass('ildidactictemplategui');
         $this->ctrl->setCmd('confirmTemplateSwitch');
         $dtpl_gui = new ilDidacticTemplateGUI($this);
         return $this->ctrl->forwardCommand($dtpl_gui);
     }
     parent::afterUpdate();
 }