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
866ddc22
Commit
866ddc22
authored
Jan 09, 2015
by
Awais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ECOM-528 refactor the code.
parent
7eb8195c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
common/djangoapps/student/tests/test_recent_enrollments.py
+0
-2
common/djangoapps/student/views.py
+2
-5
No files found.
common/djangoapps/student/tests/test_recent_enrollments.py
View file @
866ddc22
...
...
@@ -162,8 +162,6 @@ class TestRecentEnrollments(ModuleStoreTestCase):
)
@ddt.unpack
def
test_donate_button
(
self
,
course_modes
,
enrollment_mode
,
show_donate
):
from
nose.tools
import
set_trace
;
set_trace
()
# Enable the enrollment success message
self
.
_configure_message_timeout
(
10000
)
...
...
common/djangoapps/student/views.py
View file @
866ddc22
...
...
@@ -758,16 +758,13 @@ def _allow_donation(course_modes, course_id, enrollment):
True if the course is allowing donations.
"""
# from nose.tools import set_trace;
# set_trace()
donations_enabled
=
DonationConfiguration
.
current
()
.
enabled
is_verified_mode
=
CourseMode
.
has_verified_mode
(
course_modes
[
course_id
])
has_payment_option
=
CourseMode
.
has_payment_options
(
course_id
)
return_val
=
False
if
donations_enabled
:
if
not
is_verified_mode
:
if
not
has_payment_option
:
return_val
=
True
if
not
(
is_verified_mode
and
has_payment_option
):
return_val
=
True
else
:
if
enrollment
.
mode
in
[
'audit'
,
'honor'
]:
return_val
=
True
...
...
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