Skip to content

Commit

Permalink
Merge branch 'MDL-63119-35' of git://github.com/lameze/moodle into MO…
Browse files Browse the repository at this point in the history
…ODLE_35_STABLE
  • Loading branch information
David Monllao committed Sep 25, 2018
2 parents 5874ac4 + f7035a8 commit 7133857
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions calendar/classes/external/event_exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ protected function get_other_values(renderer_base $output) {
}
$values['url'] = $url->out(false);

// Override default formatted time to make sure the date portion of the time is always rendered.
$legacyevent = container::get_event_mapper()->from_event_to_legacy_event($event);
$values['formattedtime'] = calendar_format_event_time($legacyevent, time(), null, false);

if ($event instanceof action_event_interface) {
$actionrelated = [
'context' => $context,
Expand Down
2 changes: 1 addition & 1 deletion calendar/templates/event_summary_body.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div class="container-fluid">
<div class="row">
<div class="col-xs-1">{{#pix}} i/calendareventtime, core, {{#str}} when, core_calendar {{/str}} {{/pix}}</div>
<div class="col-xs-11">{{#userdate}} {{timestart}}, {{#str}} strftimerecentfull {{/str}} {{/userdate}}</div>
<div class="col-xs-11">{{{formattedtime}}}</div>
</div>
<div class="row m-t-1">
<div class="col-xs-1">{{#pix}} i/calendar, core, {{#str}} eventtype, core_calendar {{/str}} {{/pix}}</div>
Expand Down

0 comments on commit 7133857

Please sign in to comment.