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
3d62580f
Commit
3d62580f
authored
Aug 19, 2015
by
Ahsan Ulhaq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add USD labels to prices on track selection pages
ECOM-2114
parent
d9cc3ed4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
11 deletions
+17
-11
common/templates/course_modes/choose.html
+2
-2
lms/djangoapps/courseware/tests/test_about.py
+6
-6
lms/djangoapps/courseware/tests/test_microsites.py
+3
-1
lms/static/sass/multicourse/_course_about.scss
+3
-0
lms/templates/courseware/course_about.html
+2
-1
lms/templates/verify_student/make_payment_step.underscore
+1
-1
No files found.
common/templates/course_modes/choose.html
View file @
3d62580f
...
@@ -91,7 +91,7 @@ from django.core.urlresolvers import reverse
...
@@ -91,7 +91,7 @@ from django.core.urlresolvers import reverse
<ul
class=
"list-actions"
>
<ul
class=
"list-actions"
>
<li
class=
"action action-select"
>
<li
class=
"action action-select"
>
<input
type=
"hidden"
name=
"contribution"
value=
"${min_price}"
/>
<input
type=
"hidden"
name=
"contribution"
value=
"${min_price}"
/>
<input
type=
"submit"
name=
"verified_mode"
value=
"${_('Pursue a Verified Certificate')} ($${min_price})"
/>
<input
type=
"submit"
name=
"verified_mode"
value=
"${_('Pursue a Verified Certificate')} ($${min_price}
USD
)"
/>
</li>
</li>
</ul>
</ul>
</div>
</div>
...
@@ -117,7 +117,7 @@ from django.core.urlresolvers import reverse
...
@@ -117,7 +117,7 @@ from django.core.urlresolvers import reverse
<ul
class=
"list-actions"
>
<ul
class=
"list-actions"
>
<li
class=
"action action-select"
>
<li
class=
"action action-select"
>
<input
type=
"hidden"
name=
"contribution"
value=
"${min_price}"
/>
<input
type=
"hidden"
name=
"contribution"
value=
"${min_price}"
/>
<input
type=
"submit"
name=
"verified_mode"
value=
"${_('Pursue a Verified Certificate')} ($${min_price})"
/>
<input
type=
"submit"
name=
"verified_mode"
value=
"${_('Pursue a Verified Certificate')} ($${min_price}
USD
)"
/>
</li>
</li>
</ul>
</ul>
</div>
</div>
...
...
lms/djangoapps/courseware/tests/test_about.py
View file @
3d62580f
...
@@ -430,7 +430,7 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
...
@@ -430,7 +430,7 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
url
=
reverse
(
'about_course'
,
args
=
[
self
.
course
.
id
.
to_deprecated_string
()])
url
=
reverse
(
'about_course'
,
args
=
[
self
.
course
.
id
.
to_deprecated_string
()])
resp
=
self
.
client
.
get
(
url
)
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertIn
(
"Add buyme to Cart
($10)
"
,
resp
.
content
)
self
.
assertIn
(
"Add buyme to Cart
<span>($10 USD)</span>
"
,
resp
.
content
)
def
test_logged_in
(
self
):
def
test_logged_in
(
self
):
"""
"""
...
@@ -440,7 +440,7 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
...
@@ -440,7 +440,7 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
url
=
reverse
(
'about_course'
,
args
=
[
self
.
course
.
id
.
to_deprecated_string
()])
url
=
reverse
(
'about_course'
,
args
=
[
self
.
course
.
id
.
to_deprecated_string
()])
resp
=
self
.
client
.
get
(
url
)
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertIn
(
"Add buyme to Cart
($10)
"
,
resp
.
content
)
self
.
assertIn
(
"Add buyme to Cart
<span>($10 USD)</span>
"
,
resp
.
content
)
def
test_already_in_cart
(
self
):
def
test_already_in_cart
(
self
):
"""
"""
...
@@ -455,7 +455,7 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
...
@@ -455,7 +455,7 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
resp
=
self
.
client
.
get
(
url
)
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertIn
(
"This course is in your"
,
resp
.
content
)
self
.
assertIn
(
"This course is in your"
,
resp
.
content
)
self
.
assertNotIn
(
"Add buyme to Cart
($10)
"
,
resp
.
content
)
self
.
assertNotIn
(
"Add buyme to Cart
<span>($10 USD)</span>
"
,
resp
.
content
)
def
test_already_enrolled
(
self
):
def
test_already_enrolled
(
self
):
"""
"""
...
@@ -474,7 +474,7 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
...
@@ -474,7 +474,7 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertIn
(
"You are registered for this course"
,
resp
.
content
)
self
.
assertIn
(
"You are registered for this course"
,
resp
.
content
)
self
.
assertIn
(
"View Courseware"
,
resp
.
content
)
self
.
assertIn
(
"View Courseware"
,
resp
.
content
)
self
.
assertNotIn
(
"Add buyme to Cart
($10)
"
,
resp
.
content
)
self
.
assertNotIn
(
"Add buyme to Cart
<span>($10 USD)</span>
"
,
resp
.
content
)
def
test_closed_enrollment
(
self
):
def
test_closed_enrollment
(
self
):
"""
"""
...
@@ -494,7 +494,7 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
...
@@ -494,7 +494,7 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
resp
=
self
.
client
.
get
(
url
)
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertIn
(
"Enrollment is Closed"
,
resp
.
content
)
self
.
assertIn
(
"Enrollment is Closed"
,
resp
.
content
)
self
.
assertNotIn
(
"Add buyme to Cart
($10)
"
,
resp
.
content
)
self
.
assertNotIn
(
"Add buyme to Cart
<span>($10 USD)</span>
"
,
resp
.
content
)
# course price is visible ihe course_about page when the course
# course price is visible ihe course_about page when the course
# mode is set to honor and it's price is set
# mode is set to honor and it's price is set
...
@@ -531,7 +531,7 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
...
@@ -531,7 +531,7 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
url
=
reverse
(
'about_course'
,
args
=
[
course
.
id
.
to_deprecated_string
()])
url
=
reverse
(
'about_course'
,
args
=
[
course
.
id
.
to_deprecated_string
()])
resp
=
self
.
client
.
get
(
url
)
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertIn
(
"Add buyme to Cart
($10)
"
,
resp
.
content
)
self
.
assertIn
(
"Add buyme to Cart
<span>($10 USD)</span>
"
,
resp
.
content
)
# note that we can't call self.enroll here since that goes through
# note that we can't call self.enroll here since that goes through
# the Django student views, which doesn't allow for enrollments
# the Django student views, which doesn't allow for enrollments
...
...
lms/djangoapps/courseware/tests/test_microsites.py
View file @
3d62580f
...
@@ -220,5 +220,7 @@ class TestMicrosites(ModuleStoreTestCase, LoginEnrollmentTestCase):
...
@@ -220,5 +220,7 @@ class TestMicrosites(ModuleStoreTestCase, LoginEnrollmentTestCase):
resp
=
self
.
client
.
get
(
url
,
HTTP_HOST
=
settings
.
MICROSITE_TEST_HOSTNAME
)
resp
=
self
.
client
.
get
(
url
,
HTTP_HOST
=
settings
.
MICROSITE_TEST_HOSTNAME
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertNotIn
(
"Register for {}"
.
format
(
self
.
course_with_visibility
.
id
.
course
),
resp
.
content
)
self
.
assertNotIn
(
"Register for {}"
.
format
(
self
.
course_with_visibility
.
id
.
course
),
resp
.
content
)
self
.
assertIn
(
"Add {} to Cart ($10)"
.
format
(
self
.
course_with_visibility
.
id
.
course
),
resp
.
content
)
self
.
assertIn
(
"Add {} to Cart <span>($10 USD)</span>"
.
format
(
self
.
course_with_visibility
.
id
.
course
),
resp
.
content
)
self
.
assertIn
(
'$("#add_to_cart_post").click'
,
resp
.
content
)
self
.
assertIn
(
'$("#add_to_cart_post").click'
,
resp
.
content
)
lms/static/sass/multicourse/_course_about.scss
View file @
3d62580f
...
@@ -113,6 +113,9 @@
...
@@ -113,6 +113,9 @@
&
:hover
,
&
:focus
{
&
:hover
,
&
:focus
{
color
:
rgb
(
255
,
255
,
255
);
color
:
rgb
(
255
,
255
,
255
);
}
}
span
{
display
:
inline-block
;
}
}
}
a
{
a
{
...
...
lms/templates/courseware/course_about.html
View file @
3d62580f
...
@@ -167,8 +167,9 @@ from edxmako.shortcuts import marketing_link
...
@@ -167,8 +167,9 @@ from edxmako.shortcuts import marketing_link
reg_element_id =
"reg_then_add_to_cart"
reg_element_id =
"reg_then_add_to_cart"
%
>
%
>
<a
href=
"${reg_href}"
class=
"add-to-cart"
id=
"${reg_element_id}"
>
<a
href=
"${reg_href}"
class=
"add-to-cart"
id=
"${reg_element_id}"
>
${_("Add {course_name} to Cart
({price})
")\
${_("Add {course_name} to Cart
<span>
({price} USD)
</span>
")\
.format(course_name=course.display_number_with_default, price=course_price)}
.format(course_name=course.display_number_with_default, price=course_price)}
</a>
</a>
<div
id=
"register_error"
></div>
<div
id=
"register_error"
></div>
%else:
%else:
...
...
lms/templates/verify_student/make_payment_step.underscore
View file @
3d62580f
...
@@ -101,7 +101,7 @@
...
@@ -101,7 +101,7 @@
<div class="payment-buttons nav-wizard is-ready center">
<div class="payment-buttons nav-wizard is-ready center">
<input type="hidden" name="contribution" value="<%- minPrice %>" />
<input type="hidden" name="contribution" value="<%- minPrice %>" />
<div class="purchase">
<div class="purchase">
<p class="product-info"><span class="product-name"></span> <%- gettext( "price" ) %>: <span class="price">$<%- minPrice %></span></p>
<p class="product-info"><span class="product-name"></span> <%- gettext( "price" ) %>: <span class="price">$<%- minPrice %>
USD
</span></p>
</div>
</div>
<div class="pay-options">
<div class="pay-options">
<%
<%
...
...
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