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
ceeb0e35
Commit
ceeb0e35
authored
Nov 02, 2016
by
Nimisha Asthagiri
Committed by
GitHub
Nov 02, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13887 from edx/hotfix2/2016-11-01
Add grades feature check to subsection task handler.
parents
f03e2ce6
8ae20e38
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
lms/djangoapps/grades/tasks.py
+3
-1
lms/djangoapps/grades/tests/test_tasks.py
+1
-1
No files found.
lms/djangoapps/grades/tasks.py
View file @
ceeb0e35
...
...
@@ -32,8 +32,10 @@ def recalculate_subsection_grade(user_id, course_id, usage_id, only_if_higher):
be updated only if the new grade is higher than the previous
value.
"""
course_key
=
CourseLocator
.
from_string
(
course_id
)
if
not
PersistentGradesEnabledFlag
.
feature_enabled
(
course_id
):
return
course_key
=
CourseLocator
.
from_string
(
course_id
)
student
=
User
.
objects
.
get
(
id
=
user_id
)
scored_block_usage_key
=
UsageKey
.
from_string
(
usage_id
)
.
replace
(
course_key
=
course_key
)
...
...
lms/djangoapps/grades/tests/test_tasks.py
View file @
ceeb0e35
...
...
@@ -178,7 +178,7 @@ class RecalculateSubsectionGradeTest(ModuleStoreTestCase):
with
self
.
store
.
default_store
(
default_store
):
self
.
set_up_course
(
enable_subsection_grades
=
False
)
self
.
assertFalse
(
PersistentGradesEnabledFlag
.
feature_enabled
(
self
.
course
.
id
))
with
check_mongo_calls
(
2
)
and
self
.
assertNumQueries
(
2
):
with
check_mongo_calls
(
2
)
and
self
.
assertNumQueries
(
0
):
recalculate_subsection_grade
.
apply
(
args
=
tuple
(
self
.
score_changed_kwargs
.
values
()))
@skip
(
"Pending completion of TNL-5089"
)
...
...
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