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
6cd45965
Commit
6cd45965
authored
Sep 15, 2014
by
Matt Drayer
Committed by
Jonathan Piacenti
Aug 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mattdrayer/api - Proforma grading fix
parent
d201c06f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lms/djangoapps/api_manager/courseware_access.py
+5
-5
No files found.
lms/djangoapps/api_manager/courseware_access.py
View file @
6cd45965
...
...
@@ -180,10 +180,10 @@ def calculate_proforma_grade(grade_summary, grading_policy):
points_possible
=
points_possible
+
score
.
possible
if
points_possible
:
grade
=
points_earned
/
points_possible
section_policy
=
next
((
policy
for
policy
in
grading_policy
[
'GRADER'
]
if
policy
[
'type'
]
==
section
),
None
)
if
section_policy
is
not
None
:
section_weight
=
section_policy
[
'weight'
]
proforma_grade
=
proforma_grade
+
(
section_weight
*
grade
)
remaining_weight
=
remaining_weight
-
section_weight
section_policy
=
next
((
policy
for
policy
in
grading_policy
[
'GRADER'
]
if
policy
[
'type'
]
==
section
),
None
)
if
section_policy
is
not
None
:
section_weight
=
section_policy
[
'weight'
]
proforma_grade
=
proforma_grade
+
(
section_weight
*
grade
)
remaining_weight
=
remaining_weight
-
section_weight
proforma_grade
=
proforma_grade
+
remaining_weight
return
proforma_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