MODULE = 'bx_courses'; parent::__construct($aObject, $oTemplate); $CNF = &$this->_oModule->_oConfig->CNF; $bLoggedOwner = isset($this->_aContentInfo[$CNF['FIELD_AUTHOR']]) && $this->_aContentInfo[$CNF['FIELD_AUTHOR']] == bx_get_logged_profile_id(); $bLoggedModerator = $this->_oModule->checkAllowedEditAnyEntry() === CHECK_ACTION_RESULT_ALLOWED; if(($oInformer = BxDolInformer::getInstance($this->_oTemplate)) && ($bLoggedOwner || $bLoggedModerator)) { $aInformers = []; if($aInformers) foreach($aInformers as $aInformer) $oInformer->add($aInformer['name'], $this->_replaceMarkers($aInformer['msg']), $aInformer['type']); } } public function getCode () { $sResult = parent::getCode(); if(!empty($sResult)) $sResult .= $this->_oModule->_oTemplate->getJsCode('entry'); $this->_oModule->_oTemplate->addJs(['modules/base/groups/js/|entry.js', 'entry.js']); return $sResult; } } /** @} */