Skip to content
Snippets Groups Projects
Commit e998d6d8 authored by srosse's avatar srosse
Browse files

OO-2816: filter wiki/blog/podcast notifications

parent 94d12464
No related branches found
No related tags found
No related merge requests found
......@@ -80,13 +80,12 @@ public abstract class FeedNotificationsHandler implements NotificationsHandler {
try {
RepositoryEntry re = repoManager.lookupRepositoryEntry(
OresHelper.createOLATResourceableInstance(p.getResName(), p.getResId()), false);
if (re.getAccess() == RepositoryEntry.DELETED || re.getRepositoryEntryStatus().isClosed() || re.getRepositoryEntryStatus().isUnpublished()) {
return notificationsManager.getNoSubscriptionInfo();
}
String displayName = re.getDisplayname();
if("CourseModule".equals(p.getResName())) {
if (re.getRepositoryEntryStatus().isClosed() || re.getRepositoryEntryStatus().isUnpublished()) {
return notificationsManager.getNoSubscriptionInfo();
} else {
title = translator.translate(NOTIFICATIONS_HEADER_COURSE, new String[]{displayName});
}
title = translator.translate(NOTIFICATIONS_HEADER_COURSE, new String[]{displayName});
} else {
title = getHeader(translator, displayName);
}
......
......@@ -213,6 +213,7 @@ public class WikiPageChangeOrCreateNotificationHandler implements NotificationsH
private boolean courseStatus(ICourse course) {
return course != null
&& course.getCourseEnvironment().getCourseGroupManager().getCourseEntry().getAccess() != RepositoryEntry.DELETED
&& !course.getCourseEnvironment().getCourseGroupManager().getCourseEntry().getRepositoryEntryStatus().isUnpublished()
&& !course.getCourseEnvironment().getCourseGroupManager().getCourseEntry().getRepositoryEntryStatus().isClosed();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment