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
606e8b1d
Commit
606e8b1d
authored
Aug 19, 2013
by
Jason Bau
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #697 from edx/fix/jbau/openendmodule-round-score-up
small change in aggregating peer eval grades (rounds up)
parents
73ad057e
fa3bd7a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
2 deletions
+34
-2
common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py
+1
-1
common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
+33
-1
No files found.
common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py
View file @
606e8b1d
...
...
@@ -527,7 +527,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
feedback
=
""
.
join
(
feedback_items
)
else
:
feedback
=
feedback_items
score
=
int
(
median
(
score_result
[
'score'
]
))
score
=
int
(
round
(
median
(
score_result
[
'score'
])
))
else
:
# This is for instructor and ML grading
feedback
,
rubric_score
=
self
.
_format_feedback
(
score_result
,
system
)
...
...
common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
View file @
606e8b1d
...
...
@@ -291,6 +291,30 @@ class OpenEndedModuleTest(unittest.TestCase):
'xqueue_body'
:
json
.
dumps
(
score_msg
)}
self
.
openendedmodule
.
update_score
(
get
,
self
.
test_system
)
def
update_score_multiple
(
self
):
self
.
openendedmodule
.
new_history_entry
(
"New Entry"
)
feedback
=
{
"success"
:
True
,
"feedback"
:
"Grader Feedback"
}
score_msg
=
{
'correct'
:
True
,
'score'
:
[
0
,
1
],
'msg'
:
'Grader Message'
,
'feedback'
:
[
json
.
dumps
(
feedback
),
json
.
dumps
(
feedback
)],
'grader_type'
:
'PE'
,
'grader_id'
:
[
'1'
,
'2'
],
'submission_id'
:
'1'
,
'success'
:
True
,
'rubric_scores'
:
[[
0
],
[
0
]],
'rubric_scores_complete'
:
[
True
,
True
],
'rubric_xml'
:
[
etree
.
tostring
(
self
.
rubric
),
etree
.
tostring
(
self
.
rubric
)]
}
get
=
{
'queuekey'
:
"abcd"
,
'xqueue_body'
:
json
.
dumps
(
score_msg
)}
self
.
openendedmodule
.
update_score
(
get
,
self
.
test_system
)
def
test_latest_post_assessment
(
self
):
self
.
update_score_single
()
assessment
=
self
.
openendedmodule
.
latest_post_assessment
(
self
.
test_system
)
...
...
@@ -298,11 +322,19 @@ class OpenEndedModuleTest(unittest.TestCase):
# check for errors
self
.
assertFalse
(
'errors'
in
assessment
)
def
test_update_score
(
self
):
def
test_update_score
_single
(
self
):
self
.
update_score_single
()
score
=
self
.
openendedmodule
.
latest_score
()
self
.
assertEqual
(
score
,
4
)
def
test_update_score_multiple
(
self
):
"""
Tests that a score of [0, 1] gets aggregated to 1. A change in behavior added by @jbau
"""
self
.
update_score_multiple
()
score
=
self
.
openendedmodule
.
latest_score
()
self
.
assertEquals
(
score
,
1
)
class
CombinedOpenEndedModuleTest
(
unittest
.
TestCase
):
"""
...
...
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