Commit 08ab462c by Harry Rein

Remove old messaging wells.

LEARNER-2236
parent ed9b93ff
...@@ -121,37 +121,6 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -121,37 +121,6 @@ from openedx.core.djangolib.markup import HTML, Text
</li> </li>
% endfor % endfor
</ol> </ol>
% else:
<div class="well depth-0 message-area">
<div class="copy-large">
<span class="icon fa fa-calendar-o" aria-hidden="true"></span>
<%
course_started = course.start.date() <= date.today()
%>
% if course.start_date_is_still_default:
${_("This course has not started yet.")}
% elif course_started:
${_("We're still working on course content.")}
% else:
${Text(_("This course has not started yet, and will launch on {launch_date_html}.")).format(
launch_date_html=HTML(
'<span'
' class="localized-datetime start-date"'
' data-datetime="{start_date}"'
' data-format="shortDate"'
' data-timezone="{user_timezone}"'
' data-language="{user_language}"'
'></span>'
).format(
start_date=course.start,
user_timezone=user_timezone,
user_language=user_language,
),
)}
% endif
</div>
</div>
% endif % endif
</main> </main>
......
...@@ -334,33 +334,3 @@ class TestCourseOutlinePreview(SharedModuleStoreTestCase): ...@@ -334,33 +334,3 @@ class TestCourseOutlinePreview(SharedModuleStoreTestCase):
response = self.client.get(url) response = self.client.get(url)
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
self.assertNotContains(response, 'Future Chapter') self.assertNotContains(response, 'Future Chapter')
@ddt.ddt
class TestEmptyCourseOutlinePage(SharedModuleStoreTestCase):
"""
Test the new course outline view.
"""
FUTURE_DAY = 'future_day'
PAST_DAY = 'past_day'
DATES = {
'default_start_date': DEFAULT_START_DATE,
FUTURE_DAY: datetime.datetime.now() + datetime.timedelta(days=30),
PAST_DAY: datetime.datetime.now() - datetime.timedelta(days=30),
}
@ddt.data(
(FUTURE_DAY, 'This course has not started yet, and will launch on'),
(PAST_DAY, "We're still working on course content."),
('default_start_date', 'This course has not started yet.'),
)
@ddt.unpack
def test_empty_course_rendering(self, start_date_name, expected_text):
course = CourseFactory.create(start=self.DATES[start_date_name])
test_user = UserFactory(password=TEST_PASSWORD)
CourseEnrollment.enroll(test_user, course.id)
self.client.login(username=test_user.username, password=TEST_PASSWORD)
url = course_home_url(course)
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
self.assertContains(response, escape(expected_text))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment