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
48484ef9
Commit
48484ef9
authored
Aug 28, 2013
by
David Ormsbee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move suggested price listing to common include template
parent
0d678273
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
48 deletions
+14
-48
common/djangoapps/course_modes/views.py
+7
-2
common/templates/course_modes/choose.html
+1
-22
lms/djangoapps/verify_student/views.py
+4
-0
lms/templates/verify_student/photo_verification.html
+2
-24
No files found.
common/djangoapps/course_modes/views.py
View file @
48484ef9
...
...
@@ -21,11 +21,16 @@ class ChooseModeView(View):
@method_decorator
(
login_required
)
def
get
(
self
,
request
):
course_id
=
request
.
GET
.
get
(
"course_id"
)
modes
=
CourseMode
.
modes_for_course_dict
(
course_id
)
context
=
{
"course_id"
:
course_id
,
"modes"
:
CourseMode
.
modes_for_course_dict
(
course_id
)
,
"course_name"
:
course_from_id
(
course_id
)
.
display_name
"modes"
:
modes
,
"course_name"
:
course_from_id
(
course_id
)
.
display_name
,
}
if
"verified"
in
modes
:
context
[
"suggested_prices"
]
=
modes
[
"verified"
]
.
suggested_prices
.
split
(
","
)
context
[
"currency"
]
=
modes
[
"verified"
]
.
currency
.
upper
()
return
render_to_response
(
"course_modes/choose.html"
,
context
)
...
...
common/templates/course_modes/choose.html
View file @
48484ef9
...
...
@@ -54,28 +54,7 @@
<span
class=
"ribbon"
></span>
<p>
Sign up as a verified student and work toward a Certificate of Achievement.
</p>
<dl>
<dt>
Select your contribution for this course:
</dt>
<dd>
<ul
class=
"pay-options"
>
% for price in modes["verified"].suggested_prices.split(","):
<li>
<input
type=
"radio"
name=
"contribution"
value=
"${price|h}"
><label
for=
"contribution-${price|h}"
>
$${price} ${modes["verified"].currency.upper()}
</label>
</li>
% endfor
<li
class=
"other1"
>
<input
type=
"radio"
id=
"contribution-other"
name=
"contribution"
value=
""
/>
<label
for=
" contribution-other"
><span
class=
"sr"
>
Other
</span></label>
</li>
<li
class=
"other2"
>
<label
for=
"contribution-other-amt"
><span
class=
"sr"
>
Other Amount
</span>
</label>
$
<input
type=
"text"
size=
"5"
name=
"contribution-other-amt"
id=
"contribution-other-amt"
/>
</li>
</ul>
</dd>
</dl>
<
%
include
file=
"_contribution.html"
args=
"suggested_prices=suggested_prices, currency=currency"
/>
<p
class=
"tip expand"
>
<a
href=
""
>
Why do I have to pay? What if I don't meet all the requirements?
</a>
...
...
lms/djangoapps/verify_student/views.py
View file @
48484ef9
...
...
@@ -41,12 +41,16 @@ class VerifyView(View):
progress_state
=
"start"
course_id
=
request
.
GET
[
'course_id'
]
verify_mode
=
CourseMode
.
mode_for_course
(
course_id
,
"verified"
)
context
=
{
"progress_state"
:
progress_state
,
"user_full_name"
:
request
.
user
.
profile
.
name
,
"course_id"
:
course_id
,
"course_name"
:
course_from_id
(
course_id
)
.
display_name
,
"purchase_endpoint"
:
get_purchase_endpoint
(),
"suggested_prices"
:
[
int
(
price
)
for
price
in
verify_mode
.
suggested_prices
.
split
(
","
)],
"currency"
:
verify_mode
.
currency
.
upper
(),
"chosen_price"
:
request
.
session
.
get
(
"donation_for_course"
,
verify_mode
.
min_price
)
}
return
render_to_response
(
'verify_student/photo_verification.html'
,
context
)
...
...
lms/templates/verify_student/photo_verification.html
View file @
48484ef9
...
...
@@ -331,30 +331,8 @@
<div
class=
"wrapper-down"
>
<h3>
Check Your Contribution
</h3>
<dl>
<dt>
Select your contribution for this course:
</dt>
<dd>
<ul
class=
"pay-options"
>
<li>
<input
type=
"radio"
id=
"contribution-25"
name=
"contribution"
>
<label
for=
"contribution-25"
>
$25 USD
</label>
</li>
<li>
<input
type=
"radio"
id=
"contribution-50"
name=
"contribution"
>
<label
for=
"contribution-50"
>
$50 USD
</label>
</li>
<li>
<input
type=
"radio"
id=
"contribution-100"
name=
"contribution"
>
<label
for=
"contribution-100"
>
$100 USD
</label>
</li>
<li
class=
"other1"
>
<input
type=
"radio"
id=
"contribution-other"
name=
"contribution"
>
<label
for=
"contribution-other"
><span
class=
"sr"
>
Other
</span></label>
</li>
<li
class=
"other2"
>
<label
for=
"contribution-other-amt"
><span
class=
"sr"
>
Other Amount
</span>
$
</label>
<input
type=
"text"
size=
"5"
name=
"contribution-other-amt"
id=
"contribution-other-amt"
>
</li>
</ul>
</dd>
</dl>
<
%
include
file=
"/course_modes/_contribution.html"
args=
"suggested_prices=suggested_prices, currency=currency, chosen_price=chosen_price"
/>
</div>
<hr
/>
...
...
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