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
c426f550
Commit
c426f550
authored
9 years ago
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Respond to code review feedback.
parent
cea06e12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
6 deletions
+2
-6
openedx/core/djangoapps/credit/api.py
+1
-3
openedx/core/djangoapps/credit/migrations/0008_delete_credit_provider_timestamp.py
+0
-0
openedx/core/djangoapps/credit/models.py
+1
-3
No files found.
openedx/core/djangoapps/credit/api.py
View file @
c426f550
...
@@ -267,8 +267,6 @@ def create_credit_request(course_key, provider_id, username):
...
@@ -267,8 +267,6 @@ def create_credit_request(course_key, provider_id, username):
if
created
:
if
created
:
credit_request
.
uuid
=
uuid
.
uuid4
()
.
hex
credit_request
.
uuid
=
uuid
.
uuid4
()
.
hex
else
:
credit_request
.
timestamp
=
datetime
.
datetime
.
now
(
pytz
.
UTC
)
# Retrieve user account and profile info
# Retrieve user account and profile info
user
=
User
.
objects
.
select_related
(
'profile'
)
.
get
(
username
=
username
)
user
=
User
.
objects
.
select_related
(
'profile'
)
.
get
(
username
=
username
)
...
@@ -291,7 +289,7 @@ def create_credit_request(course_key, provider_id, username):
...
@@ -291,7 +289,7 @@ def create_credit_request(course_key, provider_id, username):
parameters
=
{
parameters
=
{
"request_uuid"
:
credit_request
.
uuid
,
"request_uuid"
:
credit_request
.
uuid
,
"timestamp"
:
to_timestamp
(
credit_request
.
timestamp
),
"timestamp"
:
to_timestamp
(
datetime
.
datetime
.
now
(
pytz
.
UTC
)
),
"course_org"
:
course_key
.
org
,
"course_org"
:
course_key
.
org
,
"course_num"
:
course_key
.
course
,
"course_num"
:
course_key
.
course
,
"course_run"
:
course_key
.
run
,
"course_run"
:
course_key
.
run
,
...
...
This diff is collapsed.
Click to expand it.
openedx/core/djangoapps/credit/migrations/0008_delete_credit_provider_timestamp.py
0 → 100644
View file @
c426f550
This diff is collapsed.
Click to expand it.
openedx/core/djangoapps/credit/models.py
View file @
c426f550
...
@@ -14,7 +14,6 @@ from django.core.validators import RegexValidator
...
@@ -14,7 +14,6 @@ from django.core.validators import RegexValidator
from
simple_history.models
import
HistoricalRecords
from
simple_history.models
import
HistoricalRecords
from
jsonfield.fields
import
JSONField
from
jsonfield.fields
import
JSONField
from
util.date_utils
import
to_timestamp
from
model_utils.models
import
TimeStampedModel
from
model_utils.models
import
TimeStampedModel
from
xmodule_django.models
import
CourseKeyField
from
xmodule_django.models
import
CourseKeyField
from
django.utils.translation
import
ugettext_lazy
from
django.utils.translation
import
ugettext_lazy
...
@@ -343,7 +342,6 @@ class CreditRequest(TimeStampedModel):
...
@@ -343,7 +342,6 @@ class CreditRequest(TimeStampedModel):
username
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
)
username
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
)
course
=
models
.
ForeignKey
(
CreditCourse
,
related_name
=
"credit_requests"
)
course
=
models
.
ForeignKey
(
CreditCourse
,
related_name
=
"credit_requests"
)
provider
=
models
.
ForeignKey
(
CreditProvider
,
related_name
=
"credit_requests"
)
provider
=
models
.
ForeignKey
(
CreditProvider
,
related_name
=
"credit_requests"
)
timestamp
=
models
.
DateTimeField
(
auto_now_add
=
True
)
parameters
=
JSONField
()
parameters
=
JSONField
()
REQUEST_STATUS_PENDING
=
"pending"
REQUEST_STATUS_PENDING
=
"pending"
...
@@ -393,7 +391,7 @@ class CreditRequest(TimeStampedModel):
...
@@ -393,7 +391,7 @@ class CreditRequest(TimeStampedModel):
return
[
return
[
{
{
"uuid"
:
request
.
uuid
,
"uuid"
:
request
.
uuid
,
"timestamp"
:
to_timestamp
(
request
.
modified
),
"timestamp"
:
request
.
parameters
.
get
(
"timestamp"
),
"course_key"
:
request
.
course
.
course_key
,
"course_key"
:
request
.
course
.
course_key
,
"provider"
:
{
"provider"
:
{
"id"
:
request
.
provider
.
provider_id
,
"id"
:
request
.
provider
.
provider_id
,
...
...
This diff is collapsed.
Click to expand it.
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