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
eddf5ad7
Commit
eddf5ad7
authored
Dec 20, 2017
by
Sofiya Semenova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
?
parent
f8841f18
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
lms/djangoapps/grades/course_grade.py
+8
-2
lms/djangoapps/grades/subsection_grade_factory.py
+2
-1
No files found.
lms/djangoapps/grades/course_grade.py
View file @
eddf5ad7
...
...
@@ -19,13 +19,19 @@ class CourseGradeBase(object):
"""
Base class for Course Grades.
"""
def
__init__
(
self
,
user
,
course_data
,
percent
=
0.0
,
letter_grade
=
None
,
passed
=
False
,
force_update_subsections
=
False
):
def
__init__
(
self
,
user
,
course_data
,
percent
=
0.0
,
letter_grade
=
None
,
passed
=
False
,
force_update_subsections
=
False
,
enrollment_track_changed
=
False
):
self
.
user
=
user
self
.
course_data
=
course_data
self
.
percent
=
percent
self
.
passed
=
passed
self
.
enrollment_track_changed
=
enrollment_track_changed
# Convert empty strings to None when reading from the table
self
.
letter_grade
=
letter_grade
or
None
self
.
force_update_subsections
=
force_update_subsections
...
...
@@ -213,7 +219,7 @@ class CourseGradeBase(object):
"""
Returns a list of subsection grades for the given chapter.
"""
enrollment_track_changed
=
False
if
self
.
enrollment_track_changed
is
None
else
self
.
enrollment_track_changed
enrollment_track_changed
=
bool
(
self
.
enrollment_track_changed
)
return
[
self
.
_get_subsection_grade
(
course_structure
[
subsection_key
],
enrollment_track_changed
)
for
subsection_key
in
_uniqueify_and_keep_order
(
course_structure
.
get_children
(
chapter_key
))
...
...
lms/djangoapps/grades/subsection_grade_factory.py
View file @
eddf5ad7
...
...
@@ -92,7 +92,8 @@ class SubsectionGradeFactory(object):
grade_model
=
calculated_grade
.
update_or_create_model
(
self
.
student
,
score_deleted
,
enrollment_track_changed
)
enrollment_track_changed
)
self
.
_update_saved_subsection_grade
(
subsection
.
location
,
grade_model
)
return
calculated_grade
...
...
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