mirror of
https://github.com/moodle/moodle.git
synced 2025-03-24 09:30:17 +01:00
MDL-68200 mod_forum: Fix the invalid date format in the time tags
This commit is contained in:
parent
6e95533c73
commit
b0326f0632
@ -638,9 +638,8 @@ class post extends exporter {
|
||||
private function get_author_subheading_html(stdClass $exportedauthor, int $timecreated) : string {
|
||||
$fullname = $exportedauthor->fullname;
|
||||
$profileurl = $exportedauthor->urls['profile'] ?? null;
|
||||
$formatteddate = userdate($timecreated, get_string('strftimedaydatetime', 'core_langconfig'));
|
||||
$name = $profileurl ? "<a href=\"{$profileurl}\">{$fullname}</a>" : $fullname;
|
||||
$date = "<time>{$formatteddate}</time>";
|
||||
$date = userdate_htmltime($timecreated, get_string('strftimedaydatetime', 'core_langconfig'));
|
||||
return get_string('bynameondate', 'mod_forum', ['name' => $name, 'date' => $date]);
|
||||
}
|
||||
}
|
||||
|
@ -79,9 +79,11 @@
|
||||
<div class="mb-3" tabindex="-1">
|
||||
{{#html.authorsubheading}}{{{.}}}{{/html.authorsubheading}}
|
||||
{{^html.authorsubheading}}
|
||||
<time>
|
||||
{{#userdate}} {{timecreated}}, {{#str}} strftimedaydatetime, core_langconfig {{/str}} {{/userdate}}
|
||||
</time>
|
||||
{{< core/time_element }}
|
||||
{{$elementid}}created-{{id}}-{{uniqid}}{{/elementid}}
|
||||
{{$timestampval}}{{timecreated}}{{/timestampval}}
|
||||
{{$userdateformatval}}{{#str}} strftimedaydatetime, core_langconfig {{/str}}{{/userdateformatval}}
|
||||
{{/core/time_element}}
|
||||
{{/html.authorsubheading}}
|
||||
</div>
|
||||
{{/isdeleted}}
|
||||
|
@ -371,9 +371,8 @@ class mod_forum_generator extends testing_module_generator {
|
||||
public function get_author_subheading_html(stdClass $exportedauthor, int $timecreated) : string {
|
||||
$fullname = $exportedauthor->fullname;
|
||||
$profileurl = $exportedauthor->urls['profile'] ?? null;
|
||||
$formatteddate = userdate($timecreated, get_string('strftimedaydatetime', 'core_langconfig'));
|
||||
$name = $profileurl ? "<a href=\"{$profileurl}\">{$fullname}</a>" : $fullname;
|
||||
$date = "<time>{$formatteddate}</time>";
|
||||
$date = userdate_htmltime($timecreated, get_string('strftimedaydatetime', 'core_langconfig'));
|
||||
return get_string('bynameondate', 'mod_forum', ['name' => $name, 'date' => $date]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user