diff options
| author | Moritz Strohm <strohm@data-quest.de> | 2024-09-02 11:45:02 +0000 |
|---|---|---|
| committer | Moritz Strohm <strohm@data-quest.de> | 2024-09-02 11:45:02 +0000 |
| commit | 1a938fd7c378683ce0cde9a4f2b1b247cc3a08fe (patch) | |
| tree | 5c401b28990d5575d7cef9319f836940e394df93 /lib/models/Course.php | |
| parent | b4f60d28c65cf6ce98ed660e1dbb9347958f6875 (diff) | |
TIC 4421, closes #4421
Closes #4421
Merge request studip/studip!3347
Diffstat (limited to 'lib/models/Course.php')
| -rw-r--r-- | lib/models/Course.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/models/Course.php b/lib/models/Course.php index ea6676c..b252063 100644 --- a/lib/models/Course.php +++ b/lib/models/Course.php @@ -334,7 +334,7 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe WikiPageConfig::deleteByRange_id($course->id); //Remove all entries of the course in calendars: - $query = 'DELETE FROM `schedule_seminare` WHERE `seminar_id` = ?'; + $query = 'DELETE FROM `schedule_courses` WHERE `course_id` = ?'; $statement = DBManager::get()->execute($query, [$course->id]); //Remove connections to other e-learning systems: @@ -1114,7 +1114,13 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe } //Delete course entries in the schedule: - CalendarScheduleModel::deleteSeminarEntries($user->id, $this->id); + ScheduleCourseDate::deleteBySQL( + 'user_id = :user_id AND course_id = :course_id', + [ + 'user_id' => $user->id, + 'course_id' => $this->id + ] + ); //Log the event: StudipLog::log('SEM_USER_ADD', $this->id, $user->id, $permission_level, 'Wurde in die Veranstaltung eingetragen'); |
