diff --git a/lms/djangoapps/courseware/access_response.py b/lms/djangoapps/courseware/access_response.py index 00c120d833..4aad91c80b 100644 --- a/lms/djangoapps/courseware/access_response.py +++ b/lms/djangoapps/courseware/access_response.py @@ -3,6 +3,7 @@ This file contains all the classes used by has_access for error handling """ from django.utils.translation import ugettext as _ +from xmodule.course_metadata_utils import DEFAULT_START_DATE class AccessResponse(object): @@ -85,10 +86,13 @@ class StartDateError(AccessError): """ def __init__(self, start_date): error_code = "course_not_started" - developer_message = "Course does not start until {}".format(start_date) - user_message = _("Course does not start until {}" # pylint: disable=translation-of-non-string - .format("{:%B %d, %Y}".format(start_date))) - + if start_date == DEFAULT_START_DATE: + developer_message = "Course has not started" + user_message = _("Course has not started") + else: + developer_message = "Course does not start until {}".format(start_date) + user_message = _("Course does not start until {}" # pylint: disable=translation-of-non-string + .format("{:%B %d, %Y}".format(start_date))) super(StartDateError, self).__init__(error_code, developer_message, user_message)