4include_once 
'./Services/Mail/classes/class.ilMailTemplateContext.php';
 
   14    const ID = 
'sahs_context_lp';
 
   31        $lng->loadLanguageModule(
'sahs');
 
   33        return $lng->txt(
'sahs_mail_context_lp');
 
   43        $lng->loadLanguageModule(
'sahs');
 
   45        return $lng->txt(
'sahs_mail_context_lp_info');
 
   59        $lng->loadLanguageModule(
'trac');
 
   62        include_once 
'Services/Tracking/classes/class.ilObjUserTracking.php';
 
   66        $placeholders = array();
 
   69        $placeholders[
'sahs_title'] = array(
 
   70            'placeholder'       => 
'SCORM_TITLE',
 
   71            'label'                     => 
$lng->txt(
'obj_sahs')
 
   74        $placeholders[
'sahs_status'] = array(
 
   75            'placeholder'       => 
'SCORM_STATUS',
 
   76            'label'                     => 
$lng->txt(
'trac_status')
 
   79        $placeholders[
'sahs_mark'] = array(
 
   80            'placeholder'       => 
'SCORM_MARK',
 
   81            'label'                     => 
$lng->txt(
'trac_mark')
 
   85        $lng->loadLanguageModule(
'content');
 
   86        $placeholders[
'sahs_score'] = array(
 
   87            'placeholder'       => 
'SCORM_SCORE',
 
   88            'label'                     => 
$lng->txt(
'cont_score')
 
   92            $placeholders[
'sahs_time_spent'] = array(
 
   93                'placeholder'   => 
'SCORM_TIME_SPENT',
 
   94                'label'                 => 
$lng->txt(
'trac_spent_seconds')
 
   99            $placeholders[
'sahs_first_access'] = array(
 
  100                'placeholder'   => 
'SCORM_FIRST_ACCESS',
 
  101                'label'                 => 
$lng->txt(
'trac_first_access')
 
  104            $placeholders[
'sahs_last_access'] = array(
 
  105                'placeholder'   => 
'SCORM_LAST_ACCESS',
 
  106                'label'                 => 
$lng->txt(
'trac_last_access')
 
  111        $placeholders[
'sahs_link'] = array(
 
  112            'placeholder'       => 
'SCORM_LINK',
 
  113            'label'                     => 
$lng->txt(
'perma_link')
 
  116        return $placeholders;
 
  127        global $ilObjDataCache;
 
  129        if (!in_array($placeholder_id, array(
'sahs_title', 
'sahs_link'))) {
 
  133        $obj_id = $ilObjDataCache->lookupObjId($context_parameters[
'ref_id']);
 
  135        include_once 
'Services/Tracking/classes/class.ilObjUserTracking.php';
 
  138        switch ($placeholder_id) {
 
  140                return $ilObjDataCache->lookupTitle($obj_id);
 
  143                require_once 
'./Services/Link/classes/class.ilLink.php';
 
  147                if ($recipient === 
null) {
 
  151                include_once 
'./Services/Tracking/classes/class.ilLPStatus.php';
 
  152                include_once 
'./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php';
 
  160                if ($recipient === 
null) {
 
  164                include_once 
'./Services/Tracking/classes/class.ilLPMarks.php';
 
  166                return strlen(trim($mark)) ? $mark : 
'-';
 
  169                if ($recipient === 
null) {
 
  175                include_once 
'Modules/ScormAicc/classes/class.ilScormLP.php';
 
  177                if ($coll->getItems()) {
 
  178                    include_once 
'Services/Tracking/classes/class.ilTrQuery.php';
 
  181                    $SCOStatusForUser = (
new ilTrQuery)->getSCOsStatusForUser($recipient->getId(), $obj_id, $coll->getItems());
 
  182                    foreach ($SCOStatusForUser as $item) {
 
  183                        $scores[] = $item[
'title'] . 
': ' . $item[
'score'];
 
  186                return implode(
"\n", $scores);
 
  188            case 'sahs_time_spent':
 
  189                if ($recipient === 
null) {
 
  194                    include_once 
'./Services/Tracking/classes/class.ilLearningProgress.php';
 
  196                    if (isset($progress[
'spent_seconds'])) {
 
  202            case 'sahs_first_access':
 
  203                if ($recipient === 
null) {
 
  208                    include_once 
'./Services/Tracking/classes/class.ilLearningProgress.php';
 
  210                    if (isset($progress[
'access_time_min'])) {
 
  216            case 'sahs_last_access':
 
  217                if ($recipient === 
null) {
 
  222                    include_once 
'./Services/Tracking/classes/class.ilLearningProgress.php';
 
  224                    if (isset($progress[
'access_time'])) {
 
An exception for terminatinating execution or to throw for unit testing.
static secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date @access public.
@classDescription Date and time handling
static _lookupMark($a_usr_id, $a_obj_id)
static _lookupStatus($a_obj_id, $a_user_id, $a_create=true)
Lookup status.
const LP_STATUS_NOT_ATTEMPTED_NUM
static _getStatusText($a_status, $a_lng=null)
Get status alt text.
static _getProgress($a_user_id, $a_obj_id)
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
Class ilMailTemplateContext.
getSpecificPlaceholders()
Return an array of placeholders.
resolveSpecificPlaceholder($placeholder_id, array $context_parameters, ilObjUser $recipient=null, $html_markup=false)
const EXTENDED_DATA_SPENT_SECONDS
const EXTENDED_DATA_LAST_ACCESS
static getInstance($a_obj_id)
static _lookupObjId($a_id)