* @access public * @modulegroup elearning_interface_modules * @module Ilias3ConnectedLink * @package ELearning-Interface */ class Ilias3ConnectedLink extends ConnectedLink { /** * constructor * * init class. * @access * @param string $cms system-type */ function __construct($cms) { parent::__construct($cms); $this->cms_link = "ilias3_referrer.php"; } /** * get user module links * * returns content module links for user * @access public * @return string html-code */ function getUserModuleLinks() { global $connected_cms, $view, $search_key, $cms_select, $current_module; if ($connected_cms[$this->cms_type]->isAuthNecessary() AND (! $connected_cms[$this->cms_type]->user->isConnected())) { $output .= $this->getNewAccountLink(); } else { if (! $connected_cms[$this->cms_type]->content_module[$current_module]->isDummy() ) { if ($connected_cms[$this->cms_type]->content_module[$current_module]->isAllowed(OPERATION_READ)) { $output .= LinkButton::create(_('Starten'), URLHelper::getURL($this->cms_link . "?" . "client_id=" . $connected_cms[$this->cms_type]->getClientId() . "&cms_select=" . $this->cms_type // . "&sess_id=" . $connected_cms[$this->cms_type]->user->getSessionId() . "&ref_id=" . $connected_cms[$this->cms_type]->content_module[$current_module]->getId() . "&type=" . $connected_cms[$this->cms_type]->content_module[$current_module]->getModuleType() . $auth_data . "&target=start"), [ 'target' => '_blank', 'rel' => 'noopener noreferrer', ]); $output .= " "; } if ($connected_cms[$this->cms_type]->content_module[$current_module]->isAllowed(OPERATION_WRITE)) { $output .= LinkButton::create(_('Bearbeiten'), URLHelper::getURL($this->cms_link . "?" . "client_id=" . $connected_cms[$this->cms_type]->getClientId() . "&cms_select=" . $this->cms_type // . "&sess_id=" . $connected_cms[$this->cms_type]->user->getSessionId() . "&ref_id=" . $connected_cms[$this->cms_type]->content_module[$current_module]->getId() . "&type=" . $connected_cms[$this->cms_type]->content_module[$current_module]->getModuleType() . $auth_data . "&target=edit"), [ 'target' => '_blank', 'rel' => 'noopener noreferrer', ]); $output .= " "; } } } return $output; } /** * get admin module links * * returns links add or remove a module from course * @access public * @return string returns html-code */ function getAdminModuleLinks() { global $connected_cms, $view, $search_key, $cms_select, $current_module; $output .= "
"; return $output; // $output .= parent::getAdminModuleLinks(); } /** * get new module link * * returns link to create a new module if allowed * @access public * @return string returns html-code or false */ function getNewModuleLink() { global $connected_cms, $auth; $output = "\n"; // echo "NML."; if ((Request::get("module_type_" . $this->cms_type) != "")) { // echo "TYPE."; if ($connected_cms[$this->cms_type]->user->category == "") { // echo "NoCat."; $connected_cms[$this->cms_type]->user->newUserCategory(); if ($connected_cms[$this->cms_type]->user->category == false) return $output; } $output = " " . LinkButton::create(_('Neu anlegen'), URLHelper::getURL($this->cms_link . "?" . "client_id=" . $connected_cms[$this->cms_type]->getClientId() . "&cms_select=" . $this->cms_type // . "&sess_id=" . $connected_cms[$this->cms_type]->user->getSessionId() . "&ref_id=" . $connected_cms[$this->cms_type]->user->category . $auth_data . "&type=" . Request::option("module_type_" . $this->cms_type) . "&target=new"), [ 'target' => '_blank', 'rel' => 'noopener noreferrer', ]); // echo $output . "."; } $user_crs_role = $connected_cms[$this->cms_type]->crs_roles[$auth->auth["perm"]]; if ($user_crs_role=="admin") return $output; else return false; } /** * get start page link * * returns link to ilias start-page * @access public * @return string returns url or false */ function getStartpageLink() { global $connected_cms; if ($connected_cms[$this->cms_type]->user->isConnected()) { $output = $this->cms_link . "?" . "client_id=" . $connected_cms[$this->cms_type]->getClientId() . "&cms_select=" . $this->cms_type . "&target=login"; } return $output; } } ?>