ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilAccessibilitySupportContactsGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilAccessibilitySupportContactsGUI:
+ Collaboration diagram for ilAccessibilitySupportContactsGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 
 sendIssueMail ()
 

Static Public Member Functions

static getFooterLink ()
 
static getFooterText ()
 

Protected Attributes

ilLanguage $lng
 
ilCtrl $ctrl
 
ILIAS HTTP Services $http
 

Private Member Functions

 getAccessibilityIssueMailMessage (string $back_url)
 
 getContactLogins ()
 Get accessibility support contacts as comma separated string. More...
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilAccessibilitySupportContactsGUI

Author
Thomas Famula famul.nosp@m.a@le.nosp@m.ifos..nosp@m.de

Definition at line 24 of file class.ilAccessibilitySupportContactsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilAccessibilitySupportContactsGUI::__construct ( )

Definition at line 30 of file class.ilAccessibilitySupportContactsGUI.php.

References $ctrl, $DIC, $http, $lng, ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), and ILIAS\Repository\lng().

31  {
32  global $DIC;
33 
34  $ctrl = $DIC->ctrl();
35  $lng = $DIC->language();
36  $http = $DIC->http();
37 
38  $this->ctrl = $ctrl;
39  $this->lng = $lng;
40  $this->http = $http;
41  }
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilAccessibilitySupportContactsGUI::executeCommand ( )

Definition at line 43 of file class.ilAccessibilitySupportContactsGUI.php.

References ILIAS\Repository\ctrl().

43  : void
44  {
45  $cmd = $this->ctrl->getCmd("sendIssueMail");
46  if (in_array($cmd, array("sendIssueMail"))) {
47  $this->$cmd();
48  }
49  }
+ Here is the call graph for this function:

◆ getAccessibilityIssueMailMessage()

ilAccessibilitySupportContactsGUI::getAccessibilityIssueMailMessage ( string  $back_url)
private

Definition at line 68 of file class.ilAccessibilitySupportContactsGUI.php.

References ILIAS\Repository\lng().

Referenced by sendIssueMail().

68  : string
69  {
70  $sig = chr(13) . chr(10) . chr(13) . chr(10) . chr(13) . chr(10);
71  $sig .= $this->lng->txt("report_accessibility_link");
72  $sig .= chr(13) . chr(10);
73  $sig .= $back_url;
74  $sig = rawurlencode(base64_encode($sig));
75 
76  return $sig;
77  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getContactLogins()

ilAccessibilitySupportContactsGUI::getContactLogins ( )
private

Get accessibility support contacts as comma separated string.

Definition at line 82 of file class.ilAccessibilitySupportContactsGUI.php.

References ilObjUser\_lookupLogin(), and ilAccessibilitySupportContacts\getValidSupportContactIds().

Referenced by sendIssueMail().

82  : string
83  {
84  $logins = [];
85 
87  $logins[] = ilObjUser::_lookupLogin($contact_id);
88  }
89 
90  return implode(",", $logins);
91  }
static getValidSupportContactIds()
Get valid support contacts.
static _lookupLogin(int $a_user_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFooterLink()

static ilAccessibilitySupportContactsGUI::getFooterLink ( )
static

Definition at line 93 of file class.ilAccessibilitySupportContactsGUI.php.

References $DIC, $url, ilCtrl\getLinkTargetByClass(), ilMailGlobalServices\getMailObjectRefId(), ilAccessibilitySupportContacts\getMailsToAddress(), ilAccessibilitySupportContacts\getValidSupportContactIds(), ilLegacyFormElementsUtil\prepareFormOutput(), and ilLanguage\txt().

Referenced by ILIAS\UICore\PageContentProvider\getFooterModification().

93  : string
94  {
95  global $DIC;
96 
97  $ctrl = $DIC->ctrl();
98  $user = $DIC->user();
99  $http = $DIC->http();
100  $lng = $DIC->language();
101  $rbac_system = $DIC->rbac()->system();
102 
104  if (count($contacts) > 0) {
105  if ($rbac_system->checkAccess("internal_mail", ilMailGlobalServices::getMailObjectRefId())) {
106  return $ctrl->getLinkTargetByClass("ilaccessibilitysupportcontactsgui", "");
107  } else {
110  );
111  $request_scheme =
112  isset($http->request()->getServerParams()["HTTPS"])
113  && $http->request()->getServerParams()["HTTPS"] !== "off"
114  ? "https" : "http";
115  $url = $request_scheme . "://"
116  . $http->request()->getServerParams()["HTTP_HOST"]
117  . $http->request()->getServerParams()["REQUEST_URI"];
118  return "mailto:" . $mails . "?body=%0D%0A%0D%0A" . $lng->txt("report_accessibility_link_mailto") . "%0A" . rawurlencode($url);
119  }
120  }
121  return "";
122  }
getLinkTargetByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static prepareFormOutput($a_str, bool $a_strip=false)
global $DIC
Definition: feed.php:28
static getValidSupportContactIds()
Get valid support contacts.
$url
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFooterText()

static ilAccessibilitySupportContactsGUI::getFooterText ( )
static

Definition at line 124 of file class.ilAccessibilitySupportContactsGUI.php.

References $DIC, and ilLanguage\txt().

Referenced by ILIAS\UICore\PageContentProvider\getFooterModification().

124  : string
125  {
126  global $DIC;
127 
128  $lng = $DIC->language();
129  return $lng->txt("report_accessibility_issue");
130  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sendIssueMail()

ilAccessibilitySupportContactsGUI::sendIssueMail ( )

Definition at line 51 of file class.ilAccessibilitySupportContactsGUI.php.

References ILIAS\Repository\ctrl(), getAccessibilityIssueMailMessage(), getContactLogins(), ilMailFormCall\getRedirectTarget(), and ILIAS\FileDelivery\http().

51  : void
52  {
53  $back_url = $this->http->request()->getServerParams()["HTTP_REFERER"];
54  $this->ctrl->redirectToURL(
56  $back_url,
57  "",
58  [],
59  [
60  "type" => "new",
61  "rcp_to" => $this->getContactLogins(),
62  "sig" => $this->getAccessibilityIssueMailMessage($back_url)
63  ]
64  )
65  );
66  }
static http()
Fetches the global http state from ILIAS.
getContactLogins()
Get accessibility support contacts as comma separated string.
static getRedirectTarget( $gui, string $cmd, array $gui_params=[], array $mail_params=[], array $context_params=[])
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilAccessibilitySupportContactsGUI::$ctrl
protected

Definition at line 27 of file class.ilAccessibilitySupportContactsGUI.php.

Referenced by __construct().

◆ $http

ILIAS HTTP Services ilAccessibilitySupportContactsGUI::$http
protected

Definition at line 28 of file class.ilAccessibilitySupportContactsGUI.php.

Referenced by __construct().

◆ $lng

ilLanguage ilAccessibilitySupportContactsGUI::$lng
protected

Definition at line 26 of file class.ilAccessibilitySupportContactsGUI.php.

Referenced by __construct().


The documentation for this class was generated from the following file: