Skip to content

Commit e31ec02

Browse files
committed
fix secondary order of dashboard listings
1 parent b928b2a commit e31ec02

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

components/ILIAS/Dashboard/Block/classes/class.ilDashboardBlockGUI.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -594,17 +594,23 @@ public function getItemGroups(): array
594594
$data = $this->getData();
595595
$data = array_merge(...array_values($data));
596596
$data = $this->sortByTitle($data);
597-
return ['' => $data];
597+
$groups = ['' => $data];
598+
break;
598599
case ilPDSelectedItemsBlockConstants::SORT_BY_START_DATE:
599-
return $this->groupItemsByStartDate();
600+
$groups = $this->groupItemsByStartDate();
601+
break;
600602
case ilPDSelectedItemsBlockConstants::SORT_BY_TYPE:
601-
return $this->groupItemsByType();
603+
$groups = $this->groupItemsByType();
604+
break;
602605
case ilPDSelectedItemsBlockConstants::SORT_MANUALLY:
603-
return ['' => $this->sortManually($this->getData())];
606+
$groups = ['' => $this->sortManually($this->getData())];
607+
break;
604608
case ilPDSelectedItemsBlockConstants::SORT_BY_LOCATION:
605609
default:
606-
return $this->groupItemsByLocation();
610+
$groups = $this->groupItemsByLocation();
607611
}
612+
ksort($groups, SORT_NATURAL);
613+
return $groups;
608614
}
609615

610616
public function addToDeskObject(): void

0 commit comments

Comments
 (0)