mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-65699 core_calendar: Check string exists for event types
This commit is contained in:
parent
a866c5c238
commit
79b9f905b1
@ -275,7 +275,9 @@ class event_exporter_base extends exporter {
|
||||
}
|
||||
$timesort = $event->get_times()->get_sort_time()->getTimestamp();
|
||||
$iconexporter = new event_icon_exporter($event, ['context' => $context]);
|
||||
$values['normalisedeventtypetext'] = get_string('type' . $values['normalisedeventtype'], 'calendar');
|
||||
$identifier = 'type' . $values['normalisedeventtype'];
|
||||
$stringexists = get_string_manager()->string_exists($identifier, 'calendar');
|
||||
$values['normalisedeventtypetext'] = $stringexists ? get_string($identifier, 'calendar') : '';
|
||||
|
||||
$values['icon'] = $iconexporter->export($output);
|
||||
|
||||
|
@ -59,10 +59,12 @@
|
||||
<div class="col-xs-1">{{#pix}} i/calendareventtime, core, {{#str}} when, core_calendar {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11">{{{formattedtime}}}</div>
|
||||
</div>
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/calendar, core, {{#str}} eventtype, core_calendar {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11">{{normalisedeventtypetext}}</div>
|
||||
</div>
|
||||
{{#normalisedeventtypetext}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/calendar, core, {{#str}} eventtype, core_calendar {{/str}} {{/pix}}</div>
|
||||
<div class="col-xs-11">{{normalisedeventtypetext}}</div>
|
||||
</div>
|
||||
{{/normalisedeventtypetext}}
|
||||
{{#description}}
|
||||
<div class="row mt-1">
|
||||
<div class="col-xs-1">{{#pix}} i/calendareventdescription, core, {{#str}} description {{/str}} {{/pix}}</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user