Fixing the issue where an anonymous user tries to access the calendar of...

... a course and it causes AttributeError: 'AnonymousUser' object has no attribute 'get_profile'.