Skip to content

Commit

Permalink
Fix display of one single competency
Browse files Browse the repository at this point in the history
  • Loading branch information
georgmaisser committed Dec 6, 2024
1 parent 8be40c7 commit fc4d624
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion classes/output/mod_booking_renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,10 @@ public function prepare_kompetenzen($id) {
$competencies = explode(',', $settings->customfields['kompetenzen']);
}

$organisations = shortcodes::get_kompetenzen();
if (count($competencies) > 1) {
$returnorgas = [];
$organisations = shortcodes::get_kompetenzen();

foreach ($settings->customfields['kompetenzen'] as $orgaid) {
if (isset($organisations[$orgaid])) {
$returnorgas[] = $organisations[$orgaid]['localizedname'];
Expand All @@ -213,6 +214,9 @@ public function prepare_kompetenzen($id) {
return $returnorgas;
} else {
$value = reset($competencies);
if (isset($organisations[$value])) {
$value = $organisations[$value]['localizedname'];
}
return [$value];
}
}
Expand Down

0 comments on commit fc4d624

Please sign in to comment.