aboutsummaryrefslogtreecommitdiff
path: root/lib/models/Course.class.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2023-11-08 13:44:17 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2023-11-08 13:44:17 +0000
commita7bd8c986c2b4f2a0fe7b4fa9f150cd60f4ca431 (patch)
tree23eb01e3a7442c9eeaae854469800279d4e8ab1f /lib/models/Course.class.php
parent8a725a08924cd9dcb6b1f5d5bffdc7f67f2fbcbc (diff)
clean up forum visits and ensure entries are deleted when either a user or a...
Closes #2738 Merge request studip/studip!1856
Diffstat (limited to 'lib/models/Course.class.php')
-rw-r--r--lib/models/Course.class.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/models/Course.class.php b/lib/models/Course.class.php
index c449922..ab58219 100644
--- a/lib/models/Course.class.php
+++ b/lib/models/Course.class.php
@@ -278,6 +278,10 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe
"UPDATE `seminare` SET `parent_course` = NULL WHERE `parent_course` = :course",
['course' => $course->id]
);
+ DBManager::get()->execute(
+ "DELETE FROM `forum_visits` WHERE `seminar_id` = ?",
+ [$course->id]
+ );
};
parent::configure($config);