diff --git a/public/main/inc/lib/internationalization.lib.php b/public/main/inc/lib/internationalization.lib.php index cb172d99a0f..7e5ffd54484 100644 --- a/public/main/inc/lib/internationalization.lib.php +++ b/public/main/inc/lib/internationalization.lib.php @@ -30,6 +30,7 @@ define('DATE_TIME_FORMAT_SHORT_TIME_FIRST', 7); // 03:28 PM, Aug 25 2009 define('DATE_FORMAT_NUMBER_NO_YEAR', 8); // 25.08 dd-mm define('DATE_FORMAT_ONLY_DAYNAME', 9); // Monday, Sunday, etc +define('DATE_TIME_FORMAT_SHORT_LOCALIZED', 11); // Formatting person's name. // Formatting a person's name using the pattern as it has been @@ -478,6 +479,10 @@ function api_format_date($time, $format = null, $language = null) $datetype = IntlDateFormatter::FULL; $timetype = IntlDateFormatter::SHORT; + break; + case DATE_TIME_FORMAT_SHORT_LOCALIZED: + $datetype = IntlDateFormatter::SHORT; + $timetype = IntlDateFormatter::SHORT; break; default: $datetype = IntlDateFormatter::FULL; diff --git a/public/main/lp/lp_add.php b/public/main/lp/lp_add.php index ad844eb0b7a..24fb8e69c33 100644 --- a/public/main/lp/lp_add.php +++ b/public/main/lp/lp_add.php @@ -102,13 +102,9 @@ function activate_end_date() { // accumulate_scorm_time $form->addCheckBox( 'accumulate_scorm_time', - [ - null, - get_lang( - 'When enabled, the session time for SCORM Learning Paths will be cumulative, otherwise, it will only be counted from the last update time.' - ), - ], - get_lang('Accumulate SCORM session time') + null, + get_lang('When enabled, the session time for SCORM Learning Paths will be cumulative, otherwise, it will only be counted from the last update time.'), + [] ); // Start date @@ -119,7 +115,7 @@ function activate_end_date() { ['onclick' => 'activate_start_date()'] ); $form->addElement('html', '
'); -$form->addDatePicker('published_on', get_lang('Publication date')); +$form->addDateTimePicker('published_on', get_lang('Publication date')); $form->addElement('html', '
'); //End date @@ -130,7 +126,7 @@ function activate_end_date() { ['onclick' => 'activate_end_date()'] ); $form->addElement('html', ''); $subscriptionSettings = learnpath::getSubscriptionSettings(); diff --git a/public/main/lp/lp_list.php b/public/main/lp/lp_list.php index 91cfcc4f67a..2629480fae0 100644 --- a/public/main/lp/lp_list.php +++ b/public/main/lp/lp_list.php @@ -279,10 +279,10 @@ function confirmation(name) { $start_time = $end_time = ''; if ($is_allowed_to_edit) { if (!empty($details['published_on'])) { - $start_time = api_convert_and_format_date($details['published_on'], DATE_TIME_FORMAT_SHORT); + $start_time = api_convert_and_format_date($details['published_on'], DATE_TIME_FORMAT_SHORT_LOCALIZED); } if (!empty($details['expired_on'])) { - $end_time = api_convert_and_format_date($details['expired_on'], DATE_TIME_FORMAT_SHORT); + $end_time = api_convert_and_format_date($details['expired_on'], DATE_TIME_FORMAT_SHORT_LOCALIZED); } } else { $time_limits = false;