ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilExcMailTemplateGradeReminderContext Class Reference

Handles exercise Grade reminder mail placeholders If all contexts are using the same placeholders,constructor etc. More...

+ Inheritance diagram for ilExcMailTemplateGradeReminderContext:
+ Collaboration diagram for ilExcMailTemplateGradeReminderContext:

Public Member Functions

 __construct (?OrgUnitUserService $orgUnitUserService=null, ?ilMailEnvironmentHelper $envHelper=null, ?ilMailUserHelper $usernameHelper=null, ?ilMailLanguageHelper $languageHelper=null)
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getSpecificPlaceholders ()
 
 resolveSpecificPlaceholder (string $placeholder_id, array $context_parameters, ?ilObjUser $recipient=null)
 
- Public Member Functions inherited from ilMailTemplateContext
 __construct (?OrgUnitUserService $org_unit_user_service=null, ?ilMailEnvironmentHelper $environment_helper=null, ?ilMailUserHelper $user_helper=null, ?ilMailLanguageHelper $language_helper=null)
 
 getLanguage ()
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getNestedPlaceholders ()
 
 getPlaceholders ()
 
 getSpecificPlaceholders ()
 
 resolveSpecificPlaceholder (string $placeholder_id, array $context_parameters, ?ilObjUser $recipient=null)
 
 resolvePlaceholder (string $placeholder_id, array $context_parameters, ?ilObjUser $recipient=null)
 

Data Fields

const ID = 'exc_context_grade_rmd'
 

Protected Attributes

ilLanguage $lng
 
ilObjectDataCache $obj_data_cache
 
- Protected Attributes inherited from ilMailTemplateContext
ilLanguage $language
 
ilMailEnvironmentHelper $env_helper
 
ilMailLanguageHelper $language_helper
 
ilMailUserHelper $user_helper
 
OrgUnitUserService $org_unit_user_service
 

Additional Inherited Members

- Protected Member Functions inherited from ilMailTemplateContext
 initLanguage (ilObjUser $user)
 
 initLanguageByIso2Code (string $iso_code)
 

Detailed Description

Handles exercise Grade reminder mail placeholders If all contexts are using the same placeholders,constructor etc.

todo: create base class.

Author
Jesús López lopez.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 29 of file class.ilExcMailTemplateGradeReminderContext.php.

Constructor & Destructor Documentation

◆ __construct()

ilExcMailTemplateGradeReminderContext::__construct ( ?OrgUnitUserService  $orgUnitUserService = null,
?ilMailEnvironmentHelper  $envHelper = null,
?ilMailUserHelper  $usernameHelper = null,
?ilMailLanguageHelper  $languageHelper = null 
)

Reimplemented from ilMailTemplateContext.

Definition at line 36 of file class.ilExcMailTemplateGradeReminderContext.php.

41 {
42 global $DIC;
43
45 $orgUnitUserService,
46 $envHelper,
47 $usernameHelper,
48 $languageHelper
49 );
50
51 $this->lng = $DIC->language();
52 if (isset($DIC["ilObjDataCache"])) {
53 $this->obj_data_cache = $DIC["ilObjDataCache"];
54 }
56 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ getDescription()

ilExcMailTemplateGradeReminderContext::getDescription ( )

Reimplemented from ilMailTemplateContext.

Definition at line 72 of file class.ilExcMailTemplateGradeReminderContext.php.

72 : string
73 {
75
77
78 return $lng->txt('exc_mail_context_grade_reminder_info');
79 }
loadLanguageModule(string $a_module)
Load language module.
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...

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

+ Here is the call graph for this function:

◆ getId()

ilExcMailTemplateGradeReminderContext::getId ( )

Reimplemented from ilMailTemplateContext.

Definition at line 58 of file class.ilExcMailTemplateGradeReminderContext.php.

References ID.

◆ getSpecificPlaceholders()

ilExcMailTemplateGradeReminderContext::getSpecificPlaceholders ( )
Returns
array<string, array{placeholder: string, crs_period_end_mail_placeholder: string}>

Reimplemented from ilMailTemplateContext.

Definition at line 81 of file class.ilExcMailTemplateGradeReminderContext.php.

81 : array
82 {
85
86 $placeholders = array();
87
88 $placeholders['assignment_title'] = array(
89 'placeholder' => 'ASSIGNMENT_TITLE',
90 'label' => $lng->txt('exc_mail_context_reminder_assignment_title')
91 );
92 $placeholders['exercise_title'] = array(
93 'placeholder' => 'EXERCISE_TITLE',
94 'label' => $lng->txt('exc_mail_context_reminder_exercise_title')
95 );
96
97 $placeholders['assignment_link'] = array(
98 'placeholder' => 'ASSIGNMENT_LINK',
99 'label' => $lng->txt('perma_link')
100 );
101
102 return $placeholders;
103 }

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

+ Here is the call graph for this function:

◆ getTitle()

ilExcMailTemplateGradeReminderContext::getTitle ( )

Reimplemented from ilMailTemplateContext.

Definition at line 63 of file class.ilExcMailTemplateGradeReminderContext.php.

63 : string
64 {
66
68
69 return $lng->txt('exc_mail_context_grade_reminder_title');
70 }

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

+ Here is the call graph for this function:

◆ resolveSpecificPlaceholder()

ilExcMailTemplateGradeReminderContext::resolveSpecificPlaceholder ( string  $placeholder_id,
array  $context_parameters,
?ilObjUser  $recipient = null 
)
Parameters
array<string,mixed>$context_parameters

Reimplemented from ilMailTemplateContext.

Definition at line 105 of file class.ilExcMailTemplateGradeReminderContext.php.

109 : string {
110 $ilObjDataCache = $this->obj_data_cache;
111
112 if ($placeholder_id == 'assignment_title') {
113 return ilExAssignment::lookupTitle($context_parameters["ass_id"]);
114 } else {
115 if ($placeholder_id == 'exercise_title') {
116 return $ilObjDataCache->lookupTitle((int) $context_parameters["exc_id"]);
117 } else {
118 if ($placeholder_id == 'assignment_link') {
119 return ilLink::_getLink(
120 $context_parameters["exc_ref"],
121 "exc",
122 array(),
123 "_" . $context_parameters["ass_id"]
124 );
125 }
126 }
127 }
128
129 return '';
130 }
static lookupTitle(int $a_id)

References ilExAssignment\lookupTitle().

+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilLanguage ilExcMailTemplateGradeReminderContext::$lng
protected

◆ $obj_data_cache

ilObjectDataCache ilExcMailTemplateGradeReminderContext::$obj_data_cache
protected

◆ ID

const ilExcMailTemplateGradeReminderContext::ID = 'exc_context_grade_rmd'

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