19 declare(strict_types=1);
51 $this->
http = $DIC->http();
53 $this->ilias_settings = $DIC[
'ilSetting'];
54 $this->rbac_system = $DIC[
'rbacsystem'];
57 $this->
setTitle($this->
lng->txt(
'tutorial_support_block_title'));
63 if ($this->
http->wrapper()->query()->has(
'ref_id')) {
64 return $this->
http->wrapper()->query()->retrieve(
78 if ($mail_url !== self::EMPTY_MAIL_URL_STRING) {
80 $property_name = $this->
lng->txt(
'tutorial_support_block_contact');
81 $properties[$property_name] = $mail_button;
84 $tutor_item = $this->
ui->factory()->item()->standard($name)
85 ->withLeadAvatar($avatar)
86 ->withProperties($properties);
89 $this->
user->isAnonymous() ||
94 $dropdown_actions[] = $this->
ui->factory()->legacy()->content(
97 $dropdown = $this->
ui->factory()->dropdown()->standard($dropdown_actions);
98 return $tutor_item->withActions(
$dropdown);
106 self::DATA_TUTOR_ID => $tutor->
getId(),
113 if (is_null($crs_ref_id)) {
118 return $course_members->getContacts();
123 return $tutor->
getPref(
'public_profile') ===
'g' ||
125 !$this->
user->isAnonymous() &&
126 $tutor->
getPref(
'public_profile') ===
'y' 136 return is_null($setting_value) ? false : $setting_value ===
'y';
146 return $tutor_id === $this->
user->getId();
156 return !$this->
user->isAnonymous() ||
158 $this->
user->isAnonymous() &&
165 return (
bool) $this->ilias_settings->get(
'enable_global_profiles');
170 return $this->
ui->factory()->button()->shy(
171 $this->
lng->txt(
'tutorial_support_block_send_mail'),
181 return (
string) self::EMPTY_MAIL_URL_STRING;
184 $this->
http->request()->getUri()->__toString(),
201 foreach ($tutor_ids as $tutor_id) {
205 $this->
user->isAnonymous()
217 (
string) $data[self::DATA_MAIL_URL],
218 (
string) $data[self::DATA_NAME],
219 (
int) $data[self::DATA_TUTOR_ID]
225 return self::BLOCK_TYPE;
RefineryFactory $refinery
const EMPTY_MAIL_URL_STRING
hasPublicProfile(ilObjUser $tutor)
ilRbacSystem $rbac_system
setBlockId(string $a_block_id="0")
createMailShyButton(string $mail_url)
getFullname(int $a_max_strlen=0)
ilTutorialSupportBlockGUI: ilColumnGUI
static _lookupPref(int $a_usr_id, string $a_keyword)
isUserValid(ilObjUser $tutor)
getTutorData(ilObjUser $tutor)
getListItemForData(array $data)
isTutorCurrentUser(int $tutor_id)
static _lookupObjId(int $ref_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilSetting $ilias_settings
isCurrentUserAllowedToSeeTutorBlock()
static http()
Fetches the global http state from ILIAS.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getPref(string $a_keyword)
Common interface to all items.
areILIASGlobalProfilesEnabled()
static _getPersonalPicturePath(int $a_usr_id, string $a_size='small', bool $a_force_pic=false, bool $a_prevent_no_photo_image=false, bool $html_export=false)
isIliasInternalMailEnabled()
createTutorItem(string $mail_url, string $name, int $tutor_id,)
__construct(Container $dic, ilPlugin $plugin)
getMailUrlOfUser(ilObjUser $tutor)
setTitle(string $a_title)
static getMailObjectRefId()
This class represents a block method of a block.
setPresentation(int $type)
hasContactEnabled(int $tutor_id)