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
567f2172
Commit
567f2172
authored
Sep 17, 2015
by
Kevin Falcone
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9800 from edx/hotfix-2015-09-17
Hotfix 2015 09 17
parents
7ee03f33
394c2906
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
31 additions
and
5 deletions
+31
-5
common/djangoapps/course_modes/models.py
+10
-0
lms/djangoapps/verify_student/views.py
+10
-1
lms/static/js/spec/verify_student/make_payment_step_view_spec.js
+2
-1
lms/static/js/verify_student/pay_and_verify.js
+1
-0
lms/static/js/verify_student/views/make_payment_step_view.js
+3
-1
lms/static/sass/views/_verification.scss
+2
-1
lms/templates/verify_student/make_payment_step.underscore
+1
-0
lms/templates/verify_student/pay_and_verify.html
+1
-0
requirements/edx/github.txt
+1
-1
No files found.
common/djangoapps/course_modes/models.py
View file @
567f2172
...
...
@@ -126,6 +126,16 @@ class CourseMode(models.Model):
self
.
currency
=
self
.
currency
.
lower
()
super
(
CourseMode
,
self
)
.
save
(
force_insert
,
force_update
,
using
)
@property
def
slug
(
self
):
"""
Returns mode_slug
NOTE (CCB): This is a silly hack needed because all of the class methods use tuples
with a property named slug instead of mode_slug.
"""
return
self
.
mode_slug
@classmethod
def
all_modes_for_courses
(
cls
,
course_id_list
):
"""Find all modes for a list of course IDs, including expired modes.
...
...
lms/djangoapps/verify_student/views.py
View file @
567f2172
...
...
@@ -766,9 +766,18 @@ def create_order(request):
return
HttpResponseBadRequest
(
_
(
"Selected price is not valid number."
))
current_mode
=
None
paid_modes
=
CourseMode
.
paid_modes_for_course
(
course_id
)
sku
=
request
.
POST
.
get
(
'sku'
,
None
)
if
sku
:
try
:
current_mode
=
CourseMode
.
objects
.
get
(
sku
=
sku
)
except
CourseMode
.
DoesNotExist
:
log
.
exception
(
u'Failed to find CourseMode with SKU [
%
s].'
,
sku
)
if
not
current_mode
:
# Check if there are more than 1 paid(mode with min_price>0 e.g verified/professional/no-id-professional) modes
# for course exist then choose the first one
paid_modes
=
CourseMode
.
paid_modes_for_course
(
course_id
)
if
paid_modes
:
if
len
(
paid_modes
)
>
1
:
log
.
warn
(
u"Multiple paid course modes found for course '
%
s' for create order request"
,
course_id
)
...
...
lms/static/js/spec/verify_student/make_payment_step_view_spec.js
View file @
567f2172
...
...
@@ -66,7 +66,8 @@ define([
var
params
=
{
contribution
:
kwargs
.
amount
||
""
,
course_id
:
kwargs
.
courseId
||
""
,
processor
:
kwargs
.
processor
||
""
processor
:
kwargs
.
processor
||
""
,
sku
:
kwargs
.
sku
||
""
};
// Click the "go to payment" button
...
...
lms/static/js/verify_student/pay_and_verify.js
View file @
567f2172
...
...
@@ -55,6 +55,7 @@ var edx = edx || {};
),
upgrade
:
el
.
data
(
'msg-key'
)
===
'upgrade'
,
minPrice
:
el
.
data
(
'course-mode-min-price'
),
sku
:
el
.
data
(
'course-mode-sku'
),
contributionAmount
:
el
.
data
(
'contribution-amount'
),
suggestedPrices
:
_
.
filter
(
(
el
.
data
(
'course-mode-suggested-prices'
).
toString
()).
split
(
","
),
...
...
lms/static/js/verify_student/views/make_payment_step_view.js
View file @
567f2172
...
...
@@ -17,6 +17,7 @@ var edx = edx || {};
isActive
:
true
,
suggestedPrices
:
[],
minPrice
:
0
,
sku
:
''
,
currency
:
'usd'
,
upgrade
:
false
,
verificationDeadline
:
''
,
...
...
@@ -133,7 +134,8 @@ var edx = edx || {};
postData
=
{
'processor'
:
event
.
target
.
id
,
'contribution'
:
paymentAmount
,
'course_id'
:
this
.
stepData
.
courseKey
'course_id'
:
this
.
stepData
.
courseKey
,
'sku'
:
this
.
templateContext
().
sku
};
// Disable the payment button to prevent multiple submissions
...
...
lms/static/sass/views/_verification.scss
View file @
567f2172
...
...
@@ -263,7 +263,8 @@
@include
text-align
(
center
);
.provider-logo
img
{
width
:
100px
;
max-width
:
160px
;
margin-bottom
:
$baseline
*
0
.5
;
}
.complete-order
{
...
...
lms/templates/verify_student/make_payment_step.underscore
View file @
567f2172
...
...
@@ -100,6 +100,7 @@
<% if ( isActive ) { %>
<div class="payment-buttons nav-wizard is-ready center">
<input type="hidden" name="contribution" value="<%- minPrice %>" />
<input type="hidden" name="sku" value="<%- sku %>" />
<div class="purchase">
<p class="product-info"><span class="product-name"></span> <%- gettext( "price" ) %>: <span class="price">$<%- minPrice %> USD</span></p>
</div>
...
...
lms/templates/verify_student/pay_and_verify.html
View file @
567f2172
...
...
@@ -62,6 +62,7 @@ from verify_student.views import PayAndVerifyView
data-course-mode-name=
'${course_mode.name}'
data-course-mode-slug=
'${course_mode.slug}'
data-course-mode-min-price=
'${course_mode.min_price}'
data-course-mode-sku=
'${course_mode.sku or '
'}'
data-course-mode-suggested-prices=
'${course_mode.suggested_prices}'
data-course-mode-currency=
'${course_mode.currency}'
data-contribution-amount=
'${contribution_amount}'
...
...
requirements/edx/github.txt
View file @
567f2172
...
...
@@ -58,7 +58,7 @@ git+https://github.com/edx/ecommerce-api-client.git@1.1.0#egg=ecommerce-api-clie
-e git+https://github.com/edx/edx-user-state-client.git@30c0ad4b9f57f8d48d6943eb585ec8a9205f4469#egg=edx-user-state-client
-e git+https://github.com/edx/edx-organizations.git@release-2015-08-31#egg=edx-organizations
git+https://github.com/edx/edx-proctoring.git@0.9.6
#egg=edx-proctoring==0.9.6
git+https://github.com/edx/edx-proctoring.git@0.9.6
b#egg=edx-proctoring==0.9.6b
# Third Party XBlocks
-e git+https://github.com/mitodl/edx-sga@172a90fd2738f8142c10478356b2d9ed3e55334a#egg=edx-sga
...
...
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