19declare(strict_types=1);
23 public const string ID =
'crs_context_tutor_manual_preview';
32 $this->g_lng =
$DIC->language();
43 array $context_parameters,
46 if (!in_array($placeholder_id, array(
'crs_title',
'crs_link'))) {
50 $this->g_lng->loadLanguageModule(
'sess');
52 switch ($placeholder_id) {
54 $ret = $this->g_lng->txt(self::DEFAULT_COURSE_TITLE);
57 require_once
'./Services/Link/classes/class.ilLink.php';
58 $ret = ilLink::_getLink($context_parameters[
'ref_id'],
'crs');
61 $ret = $this->g_lng->txt(self::DEFAULT_COURSE_STATUS);
64 $ret = $this->g_lng->txt(self::DEFAULT_COURSE_MARK);
66 case 'crs_time_spent':
68 require_once(
"Services/Calendar/classes/class.ilDatePresentation.php");
72 case 'crs_first_access':
74 $ret = date(
"d.m.Y", strtotime(
"-5 day"));
77 case 'crs_last_access':
79 $ret = date(
"d.m.Y", strtotime(
"-1 day"));
const string DEFAULT_COURSE_TIME_SPENT
resolveSpecificPlaceholder( $placeholder_id, array $context_parameters, ?ilObjUser $recipient=null)
const string DEFAULT_COURSE_MARK
const string DEFAULT_COURSE_TITLE
const string DEFAULT_COURSE_STATUS
static secondsToString(int $seconds, bool $force_with_seconds=false, ?ilLanguage $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
const EXTENDED_DATA_SPENT_SECONDS
const EXTENDED_DATA_LAST_ACCESS
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
if(!file_exists('../ilias.ini.php'))