* @access public * @modulegroup elearning_interface_modules * @module ConnectedLink * @package ELearning-Interface */ use Studip\Button, Studip\LinkButton; class ConnectedLink { var $cms_type; var $cms_link; /** * constructor * * init class. don't call directly, class is loaded by ConnectedCMS. * @access public * @param string $cms system-type */ function __construct($cms) { global $ELEARNING_INTERFACE_MODULES; $this->cms_type = $cms; $this->cms_link = $ELEARNING_INTERFACE_MODULES[$cms]["ABSOLUTE_PATH_ELEARNINGMODULES"] . $ELEARNING_INTERFACE_MODULES[$cms]["target_file"]; } /** * get link to create new account * * returns link to create new user-account * @access public * @return string html-code */ function getNewAccountLink() { global $connected_cms, $cms_select, $current_module; $output .= "
\n"; $output .= CSRFProtection::tokenTag(); $output .= "\n"; $output .= "cms_type]->content_module[$current_module]->getId()) . "\">\n"; $output .= "cms_type]->content_module[$current_module]->getModuleType()) . "\">\n"; $output .= "\n"; $output .= "\n"; $output .= "cms_type) . "\">\n"; $output .= "\n"; $output .= Button::createAccept(_('Starten'), 'start'); $output .= "
"; return $output; } /** * get module-links for user * * dummy-method. returns false. must be overwritten by subclass. * @access public * @return boolean returns false */ function getUserModuleLinks() { return false; } /** * get module-links for admin * * returns links to remove or add module to object * @access public * @return string html-code */ function getAdminModuleLinks() { global $connected_cms, $view, $search_key, $cms_select, $current_module; $output .= "
\n"; $output .= CSRFProtection::tokenTag(); $output .= "\n"; $output .= "\n"; $output .= "\n"; $output .= "cms_type]->content_module[$current_module]->getModuleType()) . "\">\n"; $output .= "cms_type]->content_module[$current_module]->getId()) . "\">\n"; $output .= "cms_type) . "\">\n"; if ($connected_cms[$this->cms_type]->content_module[$current_module]->isConnected()) $output .= " " . Button::create(_('Entfernen'), 'remove'); else $output .= " " . Button::create(_('Hinzufügen'), 'add'); $output .= "
"; return $output; } /** * get new module link * * dummy-method. returns false. must be overwritten by subclass. * @access public * @return boolean returns false */ function getNewModuleLink() { return false; } /** * get start page link * * dummy-method. returns false. must be overwritten by subclass. * @access public * @return boolean returns false */ function getStartpageLink() { return false; } } ?>