Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
da275eae
Commit
da275eae
authored
Feb 26, 2014
by
Dave St.Germain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaks course update html to avoid using list tags inappropriately.
LMS-1724
parent
2cb3cc36
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
cms/djangoapps/contentstore/course_info_model.py
+2
-2
cms/djangoapps/contentstore/views/tests/test_course_updates.py
+1
-1
common/test/acceptance/pages/lms/course_info.py
+1
-1
No files found.
cms/djangoapps/contentstore/course_info_model.py
View file @
da275eae
...
...
@@ -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
):
...
...
cms/djangoapps/contentstore/views/tests/test_course_updates.py
View file @
da275eae
...
...
@@ -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)
...
...
common/test/acceptance/pages/lms/course_info.py
View file @
da275eae
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment