ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 $orgUnitUserService=null, ?ilMailEnvironmentHelper $envHelper=null, ?ilMailUserHelper $usernameHelper=null, ?ilMailLanguageHelper $languageHelper=null)
 
 getLanguage ()
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 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 $envHelper
 
ilMailLanguageHelper $languageHelper
 
ilMailUserHelper $userHelper
 
OrgUnitUserService $orgUnitUserService
 

Additional Inherited Members

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

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 
)

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

References $DIC, ilMailTemplateContext\$envHelper, ilMailTemplateContext\$languageHelper, ilMailTemplateContext\$orgUnitUserService, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\lng().

41  {
42  global $DIC;
43 
46  $envHelper,
47  $usernameHelper,
49  );
50 
51  $this->lng = $DIC->language();
52  if (isset($DIC["ilObjDataCache"])) {
53  $this->obj_data_cache = $DIC["ilObjDataCache"];
54  }
56  }
OrgUnitUserService $orgUnitUserService
ilMailLanguageHelper $languageHelper
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
ilMailEnvironmentHelper $envHelper
+ Here is the call graph for this function:

Member Function Documentation

◆ getDescription()

ilExcMailTemplateGradeReminderContext::getDescription ( )

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

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

72  : string
73  {
74  $lng = $this->lng;
75 
76  $lng->loadLanguageModule('exc');
77 
78  return $lng->txt('exc_mail_context_grade_reminder_info');
79  }
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...
loadLanguageModule(string $a_module)
Load language module.
+ Here is the call graph for this function:

◆ getId()

ilExcMailTemplateGradeReminderContext::getId ( )

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

58  : string
59  {
60  return self::ID;
61  }

◆ getSpecificPlaceholders()

ilExcMailTemplateGradeReminderContext::getSpecificPlaceholders ( )

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

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

81  : array
82  {
83  $lng = $this->lng;
84  $lng->loadLanguageModule('exc');
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  }
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...
loadLanguageModule(string $a_module)
Load language module.
+ Here is the call graph for this function:

◆ getTitle()

ilExcMailTemplateGradeReminderContext::getTitle ( )

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

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

63  : string
64  {
65  $lng = $this->lng;
66 
67  $lng->loadLanguageModule('exc');
68 
69  return $lng->txt('exc_mail_context_grade_reminder_title');
70  }
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...
loadLanguageModule(string $a_module)
Load language module.
+ Here is the call graph for this function:

◆ resolveSpecificPlaceholder()

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

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

References $obj_data_cache, and ilExAssignment\lookupTitle().

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)
+ 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: