diff options
author | Simon Rettberg | 2016-08-16 17:35:03 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-08-16 17:35:03 +0200 |
commit | 5210ec844e68311598687151456aa60b1b10d9c1 (patch) | |
tree | e936bad881309b80914674e1bbde638c97a58faf /dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java | |
parent | [server] Add missing closing paren (diff) | |
download | tutor-module-5210ec844e68311598687151456aa60b1b10d9c1.tar.gz tutor-module-5210ec844e68311598687151456aa60b1b10d9c1.tar.xz tutor-module-5210ec844e68311598687151456aa60b1b10d9c1.zip |
[server] Add mail template for header and footer
Diffstat (limited to 'dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java')
-rw-r--r-- | dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java index 093df1a0..a76382ba 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java @@ -579,7 +579,9 @@ public class ServerHandler implements SatelliteServer.Iface { User.canLinkToImageOrFail(user, lecture.imageVersionId); Sanitizer.handleLectureDates(lecture, null); try { - return DbLecture.create(user, lecture); + String lectureId = DbLecture.create(user, lecture); + DbLog.log(user, lectureId, Formatter.userFullName(user) + " created lecture '" + lecture.lectureName + "'"); + return lectureId; } catch (SQLException e) { throw new TInvocationException(); } @@ -644,8 +646,10 @@ public class ServerHandler implements SatelliteServer.Iface { UserInfo user = SessionManager.getOrFail(userToken); User.canDeleteLectureOrFail(user, lectureId); try { + LectureSummary lecture = DbLecture.getLectureSummary(user, lectureId); if (!DbLecture.delete(lectureId)) throw new TNotFoundException(); + DbLog.log(user, lectureId, Formatter.userFullName(user) + " deleted lecture '" + lecture.lectureName + "'"); } catch (SQLException e) { throw new TInvocationException(); } |