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
fe5e2b35
Commit
fe5e2b35
authored
Nov 25, 2013
by
Julia Hansbrough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refunding CertificateItem now marks parent Order refunded as well
parent
3f0f7fa3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
lms/djangoapps/shoppingcart/models.py
+2
-0
lms/djangoapps/shoppingcart/tests/test_models.py
+2
-0
No files found.
lms/djangoapps/shoppingcart/models.py
View file @
fe5e2b35
...
...
@@ -422,6 +422,8 @@ class CertificateItem(OrderItem):
return
target_cert
.
status
=
'refunded'
target_cert
.
save
()
target_cert
.
order
.
status
=
'refunded'
target_cert
.
order
.
save
()
order_number
=
target_cert
.
order_id
# send billing an email so they can handle refunding
...
...
lms/djangoapps/shoppingcart/tests/test_models.py
View file @
fe5e2b35
...
...
@@ -373,6 +373,7 @@ class CertificateItemTest(ModuleStoreTestCase):
CourseEnrollment
.
unenroll
(
self
.
user
,
self
.
course_id
)
target_certs
=
CertificateItem
.
objects
.
filter
(
course_id
=
self
.
course_id
,
user_id
=
self
.
user
,
status
=
'refunded'
,
mode
=
'verified'
)
self
.
assertTrue
(
target_certs
[
0
])
self
.
assertEquals
(
target_certs
[
0
]
.
order
.
status
,
'refunded'
)
def
test_refund_cert_callback_before_expiration
(
self
):
# If the expiration date has not yet passed on a verified mode, the user can be refunded
...
...
@@ -395,6 +396,7 @@ class CertificateItemTest(ModuleStoreTestCase):
CourseEnrollment
.
unenroll
(
self
.
user
,
course_id
)
target_certs
=
CertificateItem
.
objects
.
filter
(
course_id
=
course_id
,
user_id
=
self
.
user
,
status
=
'refunded'
,
mode
=
'verified'
)
self
.
assertTrue
(
target_certs
[
0
])
self
.
assertEquals
(
target_certs
[
0
]
.
order
.
status
,
'refunded'
)
@patch
(
'shoppingcart.models.log.error'
)
def
test_refund_cert_callback_before_expiration_email_error
(
self
,
error_logger
):
...
...
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