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
dfb8e9f0
Commit
dfb8e9f0
authored
Aug 23, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix max score calculation
parent
7ff03124
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py
+3
-5
No files found.
common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py
View file @
dfb8e9f0
...
...
@@ -839,7 +839,6 @@ class CombinedOpenEndedV1Module():
for
i
in
xrange
(
0
,
len
(
self
.
task_states
)):
# For each task, extract all student scores on that task (each attempt for each task)
last_response
=
self
.
get_last_response
(
i
)
max_score
=
last_response
.
get
(
'max_score'
,
None
)
score
=
last_response
.
get
(
'all_scores'
,
None
)
if
score
is
not
None
:
# Convert none scores and weight scores properly
...
...
@@ -858,9 +857,9 @@ class CombinedOpenEndedV1Module():
else
:
score
=
0
if
max_score
is
not
None
:
if
self
.
_
max_score
is
not
None
:
# Weight the max score if it is not None
max_score
*=
float
(
weight
)
max_score
=
self
.
_max_score
*
float
(
weight
)
else
:
# Without a max_score, we cannot have a score!
score
=
None
...
...
@@ -880,8 +879,7 @@ class CombinedOpenEndedV1Module():
'''
max_score
=
None
if
self
.
check_if_done_and_scored
():
last_response
=
self
.
get_last_response
(
self
.
current_task_number
)
max_score
=
last_response
[
'max_score'
]
max_score
=
self
.
_max_score
return
max_score
def
get_progress
(
self
):
...
...
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