diff options
| author | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2023-01-26 14:48:46 +0100 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-11-12 09:40:57 +0000 |
| commit | eaad38435adcfd9f3cba50c6fb8c9abba18b004e (patch) | |
| tree | 0f22c2c03be60421094925bb8bb471a1d79d9740 /lib/models/Course.php | |
| parent | a90bf11e1e07cc1f85540edbf587b3c5bedc74e9 (diff) | |
implement methods SimpleORMap::(findDistinctBySql|findDistinctEachBySql|countDistinctBySql) to allow distinct retrieval/counting of rows, implement SimpleORMap::buildSQLQuery() so we don't have to repeat ourselves and use new method in Course::findByUser(), fixes #1885
Diffstat (limited to 'lib/models/Course.php')
| -rw-r--r-- | lib/models/Course.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/models/Course.php b/lib/models/Course.php index c8138e1..0c7c548 100644 --- a/lib/models/Course.php +++ b/lib/models/Course.php @@ -2333,7 +2333,7 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe $name_sort = Config::get()->IMPORTANT_SEMNUMBER ? 'VeranstaltungsNummer, Name' : 'Name'; - return Course::findBySQL( + return Course::findDistinctBySQL( "LEFT JOIN semester_courses ON (semester_courses.course_id = seminare.Seminar_id) WHERE Seminar_id IN (?) GROUP BY seminare.Seminar_id |
