diff options
| author | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2025-03-10 11:22:44 +0000 |
|---|---|---|
| committer | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2025-03-10 11:22:44 +0000 |
| commit | bee11b37e18db136fbcffccbedf09969096a6da0 (patch) | |
| tree | a45433c82c2910193e01d2ad22546dae4b02d6a8 /lib/models | |
| parent | a1f81c709937ec086c9c38ab0d08ae9e044d1ef5 (diff) | |
reimplement institute member export, re #5259tic-cw_slides
Merge request studip/studip!4036
Diffstat (limited to 'lib/models')
| -rw-r--r-- | lib/models/Statusgruppen.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/models/Statusgruppen.php b/lib/models/Statusgruppen.php index 015a306..b934cf5 100644 --- a/lib/models/Statusgruppen.php +++ b/lib/models/Statusgruppen.php @@ -119,7 +119,7 @@ class Statusgruppen extends SimpleORMap implements PrivacyObject public static function findAllByRangeId($range_id, $as_collection = false) { - $groups = self::findBySQL('range_id IN (?)', [$range_id]); + $groups = self::findBySQL('range_id IN (?) ORDER BY position', [$range_id]); if (count($groups) > 0) { $ids = array_map(function ($group) { return $group->id; }, $groups); $groups = array_merge($groups, self::findAllByRangeId($ids, false)); @@ -331,6 +331,18 @@ class Statusgruppen extends SimpleORMap implements PrivacyObject return $this->content['name']; } + public function getFullName($seperator = ' > ') + { + $result = [$this->name]; + + $item = $this; + while ($item = $item->parent) { + array_unshift($result, $item->name); + } + + return implode($seperator, $result); + } + /** * Puts out an array of all gendered userroles for a user in a certain * context |
