Commit da275eae by Dave St.Germain

Tweaks course update html to avoid using list tags inappropriately.

LMS-1724
parent 2cb3cc36
......@@ -226,8 +226,8 @@ def _get_html(course_updates_items):
for update in reversed(course_updates_items):
# filter course update items which have status "deleted".
if update.get("status") != CourseInfoModule.STATUS_DELETED:
list_items.append(u"<li><h2>{date}</h2>{content}</li>".format(**update))
return u"<ol>{list_items}</ol>".format(list_items="".join(list_items))
list_items.append(u"<article><h2>{date}</h2>{content}</article>".format(**update))
return u"<section>{list_items}</section>".format(list_items="".join(list_items))
def save_course_update_items(location, course_updates, course_update_items, user=None):
......
......@@ -167,7 +167,7 @@ class CourseUpdateTest(CourseTestCase):
course_updates = modulestore('direct').get_item(location)
self.assertEqual(course_updates.items, [{u'date': update_date, u'content': update_content, u'id': 1}])
# course_updates 'data' field should update accordingly
update_data = u"<ol><li><h2>" + update_date + "</h2>" + update_content + "</li></ol>"
update_data = u"<section><article><h2>{date}</h2>{content}</article></section>".format(date=update_date, content=update_content)
self.assertEqual(course_updates.data, update_data)
# test delete course update item (soft delete)
......
......@@ -20,7 +20,7 @@ class CourseInfoPage(CoursePage):
"""
Return the number of updates on the page.
"""
return self.css_count('section.updates ol li')
return self.css_count('section.updates section article')
@property
def handout_links(self):
......
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