diff options
| author | Moritz Strohm <strohm@data-quest.de> | 2024-11-05 16:20:29 +0000 |
|---|---|---|
| committer | Moritz Strohm <strohm@data-quest.de> | 2024-11-05 16:20:29 +0000 |
| commit | 18a8055ce3b61b9765c06a37bcb25fc6b3c2ea85 (patch) | |
| tree | 02d3d7fa96c2459f4bb7cdea97e9246126d8cdb5 /lib/models/Course.php | |
| parent | f79a0f63279e9ebac40ecffa29598807b06fe301 (diff) | |
course/enrolment: allow participants to enter locked courses, fixes #4822
Closes #4822
Merge request studip/studip!3612
Diffstat (limited to 'lib/models/Course.php')
| -rw-r--r-- | lib/models/Course.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/models/Course.php b/lib/models/Course.php index 68ac727..df70b43 100644 --- a/lib/models/Course.php +++ b/lib/models/Course.php @@ -1597,6 +1597,17 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe ); } + //Check the course membership: + + if ($GLOBALS['perm']->have_studip_perm('user', $this->id, $user_id)) { + return new \Studip\EnrolmentInformation( + _('Sie sind bereits in der Veranstaltung eingetragen.'), + \Studip\Information::INFO, + 'already_member', + true + ); + } + //Check the course set and if the user is on an admission list: if ($course_set = $this->getCourseSet()) { @@ -1671,17 +1682,6 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe ); } - //Check the course membership: - - if ($GLOBALS['perm']->have_studip_perm('user', $this->id, $user_id)) { - return new \Studip\EnrolmentInformation( - _('Sie sind bereits in der Veranstaltung eingetragen.'), - \Studip\Information::INFO, - 'already_member', - true - ); - } - //Check the admission status: $admission_status = $user->admission_applications->findBy('seminar_id', $this->id)->val('status'); |
