4 include_once
'./Services/Mail/classes/class.ilMailTemplateContext.php';
14 const ID =
'crs_context_tutor_manual';
33 $lng->loadLanguageModule(
'crs');
35 return $lng->txt(
'crs_mail_context_tutor_title');
47 $lng->loadLanguageModule(
'crs');
49 return $lng->txt(
'crs_mail_context_tutor_info');
65 $lng->loadLanguageModule(
'crs');
66 $lng->loadLanguageModule(
'trac');
69 include_once
'Services/Tracking/classes/class.ilObjUserTracking.php';
73 $placeholders = array();
76 $placeholders[
'crs_title'] = array(
77 'placeholder' =>
'COURSE_TITLE',
78 'label' =>
$lng->txt(
'crs_title')
81 $placeholders[
'crs_status'] = array(
82 'placeholder' =>
'COURSE_STATUS',
83 'label' =>
$lng->txt(
'trac_status')
86 $placeholders[
'crs_mark'] = array(
87 'placeholder' =>
'COURSE_MARK',
88 'label' =>
$lng->txt(
'trac_mark')
92 $placeholders[
'crs_time_spent'] = array(
93 'placeholder' =>
'COURSE_TIME_SPENT',
94 'label' =>
$lng->txt(
'trac_spent_seconds')
99 $placeholders[
'crs_first_access'] = array(
100 'placeholder' =>
'COURSE_FIRST_ACCESS',
101 'label' =>
$lng->txt(
'trac_first_access')
104 $placeholders[
'crs_last_access'] = array(
105 'placeholder' =>
'COURSE_LAST_ACCESS',
106 'label' =>
$lng->txt(
'trac_last_access')
111 $placeholders[
'crs_link'] = array(
112 'placeholder' =>
'COURSE_LINK',
113 'label' =>
$lng->txt(
'crs_mail_permanent_link')
116 return $placeholders;
129 $ilObjDataCache = $DIC[
'ilObjDataCache'];
131 if (!in_array($placeholder_id, array(
138 'crs_last_access'))) {
142 $obj_id = $ilObjDataCache->lookupObjId($context_parameters[
'ref_id']);
144 include_once
'Services/Tracking/classes/class.ilObjUserTracking.php';
150 switch ($placeholder_id) {
152 return $ilObjDataCache->lookupTitle($obj_id);
155 require_once
'./Services/Link/classes/class.ilLink.php';
159 if ($recipient === null) {
163 include_once
'./Services/Tracking/classes/class.ilLPStatus.php';
164 include_once
'./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php';
172 if ($recipient === null) {
176 include_once
'./Services/Tracking/classes/class.ilLPMarks.php';
178 return strlen(trim($mark)) ? $mark :
'-';
180 case 'crs_time_spent':
181 if ($recipient === null) {
186 include_once
'./Services/Tracking/classes/class.ilLearningProgress.php';
188 if (isset($progress[
'spent_seconds'])) {
194 case 'crs_first_access':
195 if ($recipient === null) {
200 include_once
'./Services/Tracking/classes/class.ilLearningProgress.php';
202 if (isset($progress[
'access_time_min'])) {
208 case 'crs_last_access':
209 if ($recipient === null) {
214 include_once
'./Services/Tracking/classes/class.ilLearningProgress.php';
216 if (isset($progress[
'access_time'])) {
const EXTENDED_DATA_LAST_ACCESS
static _getStatusText($a_status, $a_lng=null)
Get status alt text.
resolveSpecificPlaceholder($placeholder_id, array $context_parameters, ilObjUser $recipient=null, $html_markup=false)
getSpecificPlaceholders()
Return an array of placeholders.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
Class ilMailTemplateContext.
const EXTENDED_DATA_SPENT_SECONDS
const LP_STATUS_NOT_ATTEMPTED_NUM
static _lookupMark($a_usr_id, $a_obj_id)
static _getProgress($a_user_id, $a_obj_id)
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static _lookupStatus($a_obj_id, $a_user_id, $a_create=true)
Lookup status.