ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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.

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 }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilAccessibilitySupportContactsGUI::executeCommand ( )

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

43 : void
44 {
45 $cmd = $this->ctrl->getCmd("sendIssueMail");
46 if (in_array($cmd, array("sendIssueMail"))) {
47 $this->$cmd();
48 }
49 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getAccessibilityIssueMailMessage()

ilAccessibilitySupportContactsGUI::getAccessibilityIssueMailMessage ( string  $back_url)
private

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

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 }

References ILIAS\Repository\lng().

Referenced by sendIssueMail().

+ 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.

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)

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

Referenced by sendIssueMail().

+ 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.

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 ILIAS_HTTP_PATH . "/" . $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)
@inheritDoc
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)
$url
Definition: shib_logout.php:68

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

Referenced by ilAccessibilitySupportFooterProvider\getEntries().

+ 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.

124 : string
125 {
126 global $DIC;
127
128 $lng = $DIC->language();
129 return $lng->txt("report_accessibility_issue");
130 }

References $DIC, $lng, and ilLanguage\txt().

Referenced by ilAccessibilitySupportFooterProvider\getEntries().

+ 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.

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 }
getContactLogins()
Get accessibility support contacts as comma separated string.
static getRedirectTarget( $gui, string $cmd, array $gui_params=[], array $mail_params=[], array $context_params=[])

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

+ 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(), and getFooterLink().

◆ $http

ILIAS HTTP Services ilAccessibilitySupportContactsGUI::$http
protected

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

Referenced by __construct(), and getFooterLink().

◆ $lng

ilLanguage ilAccessibilitySupportContactsGUI::$lng
protected

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