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
247ccc37
Commit
247ccc37
authored
Apr 09, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code reformat, patch score gen
parent
112fb453
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py
+10
-6
common/lib/xmodule/xmodule/peer_grading_module.py
+3
-5
No files found.
common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py
View file @
247ccc37
...
...
@@ -740,14 +740,18 @@ class CombinedOpenEndedV1Module():
scores
=
[]
for
i
in
xrange
(
0
,
self
.
current_task_number
):
last_response
=
self
.
get_last_response
(
i
)
max_score
=
last_response
[
'max_score'
]
*
float
(
self
.
weight
)
score
=
last_response
[
'score'
]
*
float
(
self
.
weight
)
scores
.
append
(
score
)
score
=
max
(
scores
)
try
:
max_score
=
last_response
[
'max_score'
]
*
float
(
self
.
weight
)
score
=
last_response
[
'score'
]
*
float
(
self
.
weight
)
scores
.
append
(
score
)
except
:
pass
if
len
(
scores
)
>
0
:
score
=
max
(
scores
)
score_dict
=
{
'score'
:
score
,
'total'
:
max_score
,
'score'
:
score
,
'total'
:
max_score
,
}
return
score_dict
...
...
common/lib/xmodule/xmodule/peer_grading_module.py
View file @
247ccc37
...
...
@@ -183,12 +183,10 @@ class PeerGradingModule(PeerGradingFields, XModule):
score_dict
=
{
'score'
:
score
,
'total'
:
max_score
,
}
}
if
self
.
use_for_single_location
not
in
TRUE_DICT
or
self
.
is_graded
not
in
TRUE_DICT
:
return
score_dict
try
:
count_graded
=
self
.
student_data_for_location
[
'count_graded'
]
count_required
=
self
.
student_data_for_location
[
'count_required'
]
...
...
@@ -207,7 +205,7 @@ class PeerGradingModule(PeerGradingFields, XModule):
self
.
student_data_for_location
=
response
try
:
score
=
int
(
count_graded
>=
count_required
and
count_graded
>
0
)
*
float
(
self
.
weight
)
score
=
int
(
count_graded
>=
count_required
and
count_graded
>
0
)
*
float
(
self
.
weight
)
total
=
self
.
max_grade
*
float
(
self
.
weight
)
score_dict
[
'score'
]
=
score
score_dict
[
'total'
]
=
total
...
...
@@ -588,5 +586,5 @@ class PeerGradingDescriptor(PeerGradingFields, RawDescriptor):
stores_state
=
True
has_score
=
True
always_recalculate_grades
=
True
always_recalculate_grades
=
True
template_dir_name
=
"peer_grading"
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