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
4fb0d38c
Commit
4fb0d38c
authored
Aug 18, 2016
by
Renzo Lucioni
Committed by
GitHub
Aug 18, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13265 from edx/renzo/fix-dashboard-unicode-error
Fix Unicode error on dashboard
parents
82a1e5ec
de260800
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
common/djangoapps/student/tests/tests.py
+9
-1
lms/templates/dashboard/_dashboard_course_listing.html
+1
-1
No files found.
common/djangoapps/student/tests/tests.py
View file @
4fb0d38c
...
...
@@ -950,7 +950,7 @@ class RelatedProgramsTests(ProgramsApiConfigMixin, SharedModuleStoreTestCase):
def
expected_link_text
(
self
,
program
):
"""Construct expected dashboard link text."""
return
'{name} {category}'
.
format
(
name
=
program
[
'name'
],
category
=
program
[
'category'
])
return
u
'{name} {category}'
.
format
(
name
=
program
[
'name'
],
category
=
program
[
'category'
])
def
test_related_programs_listed
(
self
):
"""Verify that related programs are listed when the programs API returns data."""
...
...
@@ -982,6 +982,14 @@ class RelatedProgramsTests(ProgramsApiConfigMixin, SharedModuleStoreTestCase):
self
.
assert_related_programs
(
response
)
self
.
assertNotContains
(
response
,
unrelated_program
[
'name'
])
def
test_program_title_unicode
(
self
):
"""Verify that the dashboard can deal with programs whose titles contain Unicode."""
self
.
programs
[
0
][
'name'
]
=
u'Bases matemáticas para estudiar ingeniería'
self
.
mock_programs_api
(
self
.
programs
)
response
=
self
.
client
.
get
(
self
.
url
)
self
.
assert_related_programs
(
response
)
class
UserAttributeTests
(
TestCase
):
"""Tests for the UserAttribute model."""
...
...
lms/templates/dashboard/_dashboard_course_listing.html
View file @
4fb0d38c
...
...
@@ -284,7 +284,7 @@ from student.helpers import (
% for program in related_programs:
<li>
<span
class=
"category-icon ${program['category'].lower()}-icon"
aria-hidden=
"true"
></span>
<span><a
href=
"${program['detail_url']}"
>
${'{name} {category}'.format(name=program['name'], category=program['category'])}
</a></span>
<span><a
href=
"${program['detail_url']}"
>
${
u
'{name} {category}'.format(name=program['name'], category=program['category'])}
</a></span>
</li>
% endfor
</ul>
...
...
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