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
eb3c6ab8
Commit
eb3c6ab8
authored
May 11, 2016
by
Douglas Hall
Committed by
Matt Drayer
May 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always include the course price in the course_about template context
parent
4c0019c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
lms/djangoapps/courseware/views/views.py
+6
-11
No files found.
lms/djangoapps/courseware/views/views.py
View file @
eb3c6ab8
...
...
@@ -510,8 +510,7 @@ def course_about(request, course_id):
ecommerce_bulk_checkout_link
=
''
professional_mode
=
None
ecomm_service
=
EcommerceService
()
_is_ecomm_service_enabled
=
ecomm_service
.
is_enabled
(
request
.
user
)
if
_is_ecomm_service_enabled
and
(
if
ecomm_service
.
is_enabled
(
request
.
user
)
and
(
CourseMode
.
PROFESSIONAL
in
modes
or
CourseMode
.
NO_ID_PROFESSIONAL_MODE
in
modes
):
professional_mode
=
modes
.
get
(
CourseMode
.
PROFESSIONAL
,
''
)
or
\
...
...
@@ -520,15 +519,11 @@ def course_about(request, course_id):
if
professional_mode
.
bulk_sku
:
ecommerce_bulk_checkout_link
=
ecomm_service
.
checkout_page_url
(
professional_mode
.
bulk_sku
)
# We need to look up the price from the CourseMode only when the EcommerceService is enabled OR
# the legacy shoppingcart ecommerce implementation is enabled.
registration_price
=
0
if
_is_ecomm_service_enabled
or
_is_shopping_cart_enabled
:
registration_price
=
CourseMode
.
min_course_price_for_currency
(
course_key
,
settings
.
PAID_COURSE_REGISTRATION_CURRENCY
[
0
]
)
# Find the minimum price for the course across all course modes
registration_price
=
CourseMode
.
min_course_price_for_currency
(
course_key
,
settings
.
PAID_COURSE_REGISTRATION_CURRENCY
[
0
]
)
course_price
=
get_cosmetic_display_price
(
course
,
registration_price
)
can_add_course_to_cart
=
_is_shopping_cart_enabled
and
registration_price
...
...
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