Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
c8b87179
Commit
c8b87179
authored
9 years ago
by
Kelketek
Browse files
Options
Downloads
Plain Diff
Merge pull request #8399 from open-craft/fix-badging-name
Fix self-paced badge naming.
parents
c5dc84f8
eba951fe
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/djangoapps/certificates/badge_handler.py
+1
-1
1 addition, 1 deletion
lms/djangoapps/certificates/badge_handler.py
lms/djangoapps/certificates/tests/test_badge_handler.py
+7
-0
7 additions, 0 deletions
lms/djangoapps/certificates/tests/test_badge_handler.py
with
8 additions
and
1 deletion
lms/djangoapps/certificates/badge_handler.py
+
1
−
1
View file @
c8b87179
...
...
@@ -117,7 +117,7 @@ class BadgeHandler(object):
)
else
:
return
_
(
u
'
Completed the course
"
{course_name}
"
({course_mode})
'
).
format
(
start_dat
e
=
course
.
display_name
,
course_nam
e
=
course
.
display_name
,
course_mode
=
mode
,
)
...
...
This diff is collapsed.
Click to expand it.
lms/djangoapps/certificates/tests/test_badge_handler.py
+
7
−
0
View file @
c8b87179
...
...
@@ -115,6 +115,13 @@ class BadgeHandlerTestCase(ModuleStoreTestCase, EventTrackingTestCase):
}
)
def
test_self_paced_description
(
self
):
"""
Verify that a badge created for a course with no end date gets a different description.
"""
self
.
course
.
end
=
None
self
.
assertEqual
(
BadgeHandler
.
badge_description
(
self
.
course
,
'
honor
'
),
'
Completed the course
"
Badged
"
(honor)
'
)
def
test_ensure_badge_created_cache
(
self
):
"""
Make sure ensure_badge_created doesn
'
t call create_badge if we know the badge is already there.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment