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
735824e2
Commit
735824e2
authored
Jul 31, 2017
by
Tyler Hallada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix recalculate async kwargs
parent
dc484b80
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
15 deletions
+18
-15
lms/djangoapps/grades/services.py
+18
-15
No files found.
lms/djangoapps/grades/services.py
View file @
735824e2
...
@@ -88,13 +88,14 @@ class GradesService(object):
...
@@ -88,13 +88,14 @@ class GradesService(object):
# Recalculation will call PersistentSubsectionGrade.update_or_create_grade which will use the above override
# Recalculation will call PersistentSubsectionGrade.update_or_create_grade which will use the above override
# to update the grade before writing to the table.
# to update the grade before writing to the table.
recalculate_subsection_grade_v3
.
apply_async
(
recalculate_subsection_grade_v3
.
apply_async
(
sender
=
None
,
kwargs
=
dict
(
user_id
=
user_id
,
user_id
=
user_id
,
course_id
=
unicode
(
course_key
),
course_id
=
unicode
(
course_key
),
usage_id
=
unicode
(
usage_key
),
usage_id
=
unicode
(
usage_key
),
only_if_higher
=
False
,
only_if_higher
=
False
,
expected_modified
=
to_timestamp
(
override
.
modified
),
expected_modified
=
to_timestamp
(
override
.
modified
),
score_db_table
=
ScoreDatabaseTableEnum
.
overrides
score_db_table
=
ScoreDatabaseTableEnum
.
overrides
)
)
)
def
undo_override_subsection_grade
(
self
,
user_id
,
course_key_or_id
,
usage_key_or_id
):
def
undo_override_subsection_grade
(
self
,
user_id
,
course_key_or_id
,
usage_key_or_id
):
...
@@ -115,12 +116,14 @@ class GradesService(object):
...
@@ -115,12 +116,14 @@ class GradesService(object):
override
.
delete
()
override
.
delete
()
recalculate_subsection_grade_v3
.
apply_async
(
recalculate_subsection_grade_v3
.
apply_async
(
sender
=
None
,
kwargs
=
dict
(
user_id
=
user_id
,
user_id
=
user_id
,
course_id
=
unicode
(
course_key
),
course_id
=
unicode
(
course_key
),
usage_id
=
unicode
(
usage_key
),
usage_id
=
unicode
(
usage_key
),
only_if_higher
=
False
,
only_if_higher
=
False
,
expected_modified
=
datetime
.
now
()
.
replace
(
tzinfo
=
pytz
.
UTC
),
# Not used when score_deleted=True
# Not used when score_deleted=True:
score_deleted
=
True
,
expected_modified
=
to_timestamp
(
datetime
.
now
()
.
replace
(
tzinfo
=
pytz
.
UTC
)),
score_db_table
=
ScoreDatabaseTableEnum
.
overrides
score_deleted
=
True
,
score_db_table
=
ScoreDatabaseTableEnum
.
overrides
)
)
)
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