diff options
| author | Thomas Hackl <hackl@data-quest.de> | 2025-03-26 06:29:57 +0000 |
|---|---|---|
| committer | Thomas Hackl <hackl@data-quest.de> | 2025-03-26 06:29:57 +0000 |
| commit | 80d1a116dad1c1b3dc271412321d48c7fef9945f (patch) | |
| tree | fa219919cf0f61647cc494c2fa5f62852b72f91b /lib/models/Course.php | |
| parent | 36c8670f5d5bd05bd8ff33d46d7bd77c8086c9c8 (diff) | |
Resolve "Teilnehmende können nicht von der Anmeldeliste genommen werden"
Closes #5415 and luh/studip#279
Merge request studip/studip!4067
Diffstat (limited to 'lib/models/Course.php')
| -rw-r--r-- | lib/models/Course.php | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/lib/models/Course.php b/lib/models/Course.php index e93a14f..24e9d80 100644 --- a/lib/models/Course.php +++ b/lib/models/Course.php @@ -767,8 +767,7 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe _('%1$s konnte nicht als vorläufig teilnehmende Person zur Veranstaltung %2$s hinzugefügt werden.'), $user->getFullName(), $this->name - ), - 'add_preliminary_failed' + ) ); } if ($this->isStudygroup()) { @@ -803,16 +802,6 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe 'user_id' => $user->id ] ); - if (!$application) { - throw new \Studip\Exception( - sprintf( - _('%1$s ist nicht als vorläufig teilnehmende Person in der Veranstaltung %2$s eingetragen.'), - $user->getFullName(), - $this->name - ), - 'preliminary_member_not_found' - ); - } $deleted_from_course_set = false; $course_set = $this->getCourseSet(); @@ -823,7 +812,7 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe $this->id ); } - if ($application->delete() || $deleted_from_course_set) { + if (($application && $application->delete()) || $deleted_from_course_set) { setTempLanguage($user->id); $message = ''; if ($application->status === 'accepted') { @@ -860,8 +849,7 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe _('%1$s konnte nicht als vorläufig teilnehmende Person aus der Veranstaltung %2$s entfernt werden.'), $user->getFullName(), $this->name - ), - 'remove_preliminary_failed' + ) ); } } |
