ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables 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, bool $html_markup=false)
 
- 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, bool $html_markup=false)
 
 resolvePlaceholder (string $placeholder_id, array $context_parameters, ilObjUser $recipient=null, bool $html_markup=false)
 

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 
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  }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ 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['ass_title'] = array(
89  'placeholder' => 'ASSIGNMENT_TITLE',
90  'label' => $lng->txt('exc_mail_context_reminder_assignment_title')
91  );
92  $placeholders['exc_title'] = array(
93  'placeholder' => 'EXERCISE_TITLE',
94  'label' => $lng->txt('exc_mail_context_reminder_exercise_title')
95  );
96 
97  $placeholders['ass_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,
bool  $html_markup = false 
)

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

References $obj_data_cache, ilLink\_getLink(), and ilExAssignment\lookupTitle().

110  : string {
111  $ilObjDataCache = $this->obj_data_cache;
112 
113  if ($placeholder_id == 'ass_title') {
114  return ilExAssignment::lookupTitle($context_parameters["ass_id"]);
115  } else {
116  if ($placeholder_id == 'exc_title') {
117  return $ilObjDataCache->lookupTitle((int) $context_parameters["exc_id"]);
118  } else {
119  if ($placeholder_id == 'ass_link') {
120  return ilLink::_getLink(
121  $context_parameters["exc_ref"],
122  "exc",
123  array(),
124  "_" . $context_parameters["ass_id"]
125  );
126  }
127  }
128  }
129 
130  return '';
131  }
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: