Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
3d90c831
Commit
3d90c831
authored
10 years ago
by
Calen Pennington
Browse files
Options
Downloads
Patches
Plain Diff
Call other CourseModeView methods using serialized course_id
parent
9dc48c00
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/djangoapps/course_modes/views.py
+3
-3
3 additions, 3 deletions
common/djangoapps/course_modes/views.py
with
3 additions
and
3 deletions
common/djangoapps/course_modes/views.py
+
3
−
3
View file @
3d90c831
...
...
@@ -83,7 +83,7 @@ class ChooseModeView(View):
course
=
course_from_id
(
course_key
)
if
not
has_access
(
user
,
'
enroll
'
,
course
):
error_msg
=
_
(
"
Enrollment is closed
"
)
return
self
.
get
(
request
,
course_
key
,
error
=
error_msg
)
return
self
.
get
(
request
,
course_
id
,
error
=
error_msg
)
upgrade
=
request
.
GET
.
get
(
'
upgrade
'
,
False
)
...
...
@@ -108,12 +108,12 @@ class ChooseModeView(View):
amount_value
=
decimal
.
Decimal
(
amount
).
quantize
(
decimal
.
Decimal
(
'
.01
'
),
rounding
=
decimal
.
ROUND_DOWN
)
except
decimal
.
InvalidOperation
:
error_msg
=
_
(
"
Invalid amount selected.
"
)
return
self
.
get
(
request
,
course_
key
,
error
=
error_msg
)
return
self
.
get
(
request
,
course_
id
,
error
=
error_msg
)
# Check for minimum pricing
if
amount_value
<
mode_info
.
min_price
:
error_msg
=
_
(
"
No selected price or selected price is too low.
"
)
return
self
.
get
(
request
,
course_
key
,
error
=
error_msg
)
return
self
.
get
(
request
,
course_
id
,
error
=
error_msg
)
donation_for_course
=
request
.
session
.
get
(
"
donation_for_course
"
,
{})
donation_for_course
[
course_key
]
=
amount_value
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment