diff --git a/src/main/java/org/olat/course/run/CourseRuntimeController.java b/src/main/java/org/olat/course/run/CourseRuntimeController.java index 7a41849c42dad847618fafa5278f455a83c7693b..6dd01af17271cf91f10685b60b6a106f4f345f22 100644 --- a/src/main/java/org/olat/course/run/CourseRuntimeController.java +++ b/src/main/java/org/olat/course/run/CourseRuntimeController.java @@ -452,7 +452,7 @@ public class CourseRuntimeController extends RepositoryEntryRuntimeController im tools.setI18nKey("header.tools"); tools.setElementCssClass("o_sel_course_tools"); - if (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_COURSEEDITOR)) { + if (uce != null && (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_COURSEEDITOR))) { boolean managed = RepositoryEntryManagedFlag.isManaged(getRepositoryEntry(), RepositoryEntryManagedFlag.editcontent); boolean readOnly = uce.isCourseReadOnly(); editLink = LinkFactory.createToolLink("edit.cmd", translate("command.openeditor"), this, "o_icon_courseeditor"); diff --git a/src/main/java/org/olat/modules/webFeed/manager/FeedFileStorge.java b/src/main/java/org/olat/modules/webFeed/manager/FeedFileStorge.java index f68232bdde99019f7d45aaaabc2ee717916b6f22..89448792d3df9f8083bbf0c65e0754d1463b0942 100644 --- a/src/main/java/org/olat/modules/webFeed/manager/FeedFileStorge.java +++ b/src/main/java/org/olat/modules/webFeed/manager/FeedFileStorge.java @@ -364,7 +364,11 @@ public class FeedFileStorge { if (itemContainer != null) { VFSLeaf leaf = (VFSLeaf) itemContainer.resolve(ITEM_FILE_NAME); if (leaf != null) { - item = (ItemImpl) XStreamHelper.readObject(xstream, leaf.getInputStream()); + try { + item = (ItemImpl) XStreamHelper.readObject(xstream, leaf.getInputStream()); + } catch (Exception e) { + log.error("Item XML-File could not be read. Item container: " + leaf); + } } else { log.error("Item XML-File could not be found on file system." + " Item container: " + itemContainer.getName()); diff --git a/src/main/java/org/olat/modules/webFeed/manager/FeedNotificationsHandler.java b/src/main/java/org/olat/modules/webFeed/manager/FeedNotificationsHandler.java index b7ba2c2d397603154b2ae7dd58fb79d1f63ca79e..5dd0565d729ed958ffec20d8bf90eca04568bde5 100644 --- a/src/main/java/org/olat/modules/webFeed/manager/FeedNotificationsHandler.java +++ b/src/main/java/org/olat/modules/webFeed/manager/FeedNotificationsHandler.java @@ -69,7 +69,7 @@ public abstract class FeedNotificationsHandler implements NotificationsHandler { @Override public SubscriptionInfo createSubscriptionInfo(Subscriber subscriber, Locale locale, Date compareDate) { - SubscriptionInfo si = null; + SubscriptionInfo si; Publisher p = subscriber.getPublisher(); Date latestNews = p.getLatestNewsDate(); @@ -104,7 +104,10 @@ public abstract class FeedNotificationsHandler implements NotificationsHandler { } } si = new SubscriptionInfo(subscriber.getKey(), p.getType(), new TitleItem(title, getCssClassIcon()), items); - } + } else { + //no news + si = notificationsManager.getNoSubscriptionInfo(); + } } catch (Exception e) { log.error("Unknown Exception", e); si = notificationsManager.getNoSubscriptionInfo();