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
08e04dbd
Commit
08e04dbd
authored
Jul 31, 2017
by
Tyler Hallada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix circular import of signals from services
parent
10ed05ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lms/djangoapps/grades/services.py
+6
-3
No files found.
lms/djangoapps/grades/services.py
View file @
08e04dbd
...
...
@@ -8,7 +8,6 @@ from util.date_utils import to_timestamp
from
.constants
import
ScoreDatabaseTableEnum
from
.models
import
PersistentSubsectionGrade
,
PersistentSubsectionGradeOverride
from
.signals.handlers
import
SUBSECTION_RESCORE_EVENT_TYPE
def
_get_key
(
key_or_id
,
key_cls
):
...
...
@@ -69,7 +68,9 @@ class GradesService(object):
Fires off a recalculate_subsection_grade async task to update the PersistentSubsectionGrade table. Will not
override earned_all or earned_graded value if they are None. Both default to None.
"""
from
.tasks
import
recalculate_subsection_grade_v3
# prevent circular import
# prevent circular imports:
from
.signals.handlers
import
SUBSECTION_RESCORE_EVENT_TYPE
from
.tasks
import
recalculate_subsection_grade_v3
course_key
=
_get_key
(
course_key_or_id
,
CourseKey
)
usage_key
=
_get_key
(
usage_key_or_id
,
UsageKey
)
...
...
@@ -111,7 +112,9 @@ class GradesService(object):
Fires off a recalculate_subsection_grade async task to update the PersistentSubsectionGrade table. If the
override does not exist, no error is raised, it just triggers the recalculation.
"""
from
.tasks
import
recalculate_subsection_grade_v3
# prevent circular import
# prevent circular imports:
from
.signals.handlers
import
SUBSECTION_RESCORE_EVENT_TYPE
from
.tasks
import
recalculate_subsection_grade_v3
course_key
=
_get_key
(
course_key_or_id
,
CourseKey
)
usage_key
=
_get_key
(
usage_key_or_id
,
UsageKey
)
...
...
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