Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
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-ora2
Commits
cfd0a751
Commit
cfd0a751
authored
May 08, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove option to disable over-grading
parent
e7126bfd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
17 deletions
+10
-17
apps/openassessment/assessment/peer_api.py
+9
-13
apps/openassessment/assessment/test/test_peer.py
+0
-2
apps/openassessment/xblock/peer_assessment_mixin.py
+1
-2
No files found.
apps/openassessment/assessment/peer_api.py
View file @
cfd0a751
...
...
@@ -401,7 +401,7 @@ def get_assessments(submission_uuid, scored_only=True, limit=None):
raise
PeerAssessmentInternalError
(
error_message
)
def
get_submission_to_assess
(
submission_uuid
,
graded_by
,
over_grading
=
False
):
def
get_submission_to_assess
(
submission_uuid
,
graded_by
):
"""Get a submission to peer evaluate.
Retrieves a submission for assessment for the given student. This will
...
...
@@ -419,10 +419,6 @@ def get_submission_to_assess(submission_uuid, graded_by, over_grading=False):
associated Peer Workflow.
graded_by (int): The number of assessments a submission
requires before it has completed the peer assessment process.
over_grading (bool): Allows over grading to be performed if no submission
requires assessments. Over grading should only occur if the deadline
for submissions has passed, but there is still a window for peer
assessment. Defaults to False.
Returns:
dict: A peer submission for assessment. This contains a 'student_item',
...
...
@@ -456,17 +452,17 @@ def get_submission_to_assess(submission_uuid, graded_by, over_grading=False):
u"student."
))
peer_submission_uuid
=
workflow
.
find_active_assessments
()
# If there is an active assessment for this user, get that submission,
# otherwise, get the first assessment for review, otherwise,
if over grading
#
is turned on, get the first submission available for over grading
.
# otherwise, get the first assessment for review, otherwise,
#
get the first submission available for over grading ("over-grading")
.
if
peer_submission_uuid
is
None
:
peer_submission_uuid
=
workflow
.
get_submission_for_review
(
graded_by
)
if
peer_submission_uuid
is
None
and
over_grading
:
if
peer_submission_uuid
is
None
:
peer_submission_uuid
=
workflow
.
get_submission_for_over_grading
()
if
peer_submission_uuid
:
try
:
submission_data
=
sub_api
.
get_submission
(
peer_submission_uuid
)
PeerWorkflow
.
create_item
(
workflow
,
peer_submission_uuid
)
_log_workflow
(
peer_submission_uuid
,
workflow
,
over_grading
)
_log_workflow
(
peer_submission_uuid
,
workflow
)
return
submission_data
except
sub_api
.
SubmissionNotFoundError
:
error_message
=
_
(
...
...
@@ -701,7 +697,7 @@ def _log_assessment(assessment, scorer_workflow):
dog_stats_api
.
increment
(
'openassessment.assessment.count'
,
tags
=
tags
)
def
_log_workflow
(
submission_uuid
,
workflow
,
over_grading
):
def
_log_workflow
(
submission_uuid
,
workflow
):
"""
Log the creation of a peer-assessment workflow.
...
...
@@ -709,7 +705,6 @@ def _log_workflow(submission_uuid, workflow, over_grading):
submission_uuid (str): The UUID of the submission being assessed.
workflow (PeerWorkflow): The Peer Workflow of the student making the
assessment.
over_grading (bool): Whether over-grading is enabled.
"""
logger
.
info
(
u"Retrieved submission {} ({}, {}) to be assessed by {}"
...
...
@@ -727,7 +722,8 @@ def _log_workflow(submission_uuid, workflow, over_grading):
u"type:peer"
]
if
over_grading
:
tags
.
append
(
u"overgrading"
)
# Over-grading is always turned on
# Keep this tag for backwards-compatibility
tags
.
append
(
u"overgrading"
)
dog_stats_api
.
increment
(
'openassessment.assessment.peer_workflow.count'
,
tags
=
tags
)
apps/openassessment/assessment/test/test_peer.py
View file @
cfd0a751
...
...
@@ -637,8 +637,6 @@ class TestPeerApi(CacheResetTest):
RUBRIC_DICT
,
REQUIRED_GRADED_BY
,
)
sub
=
peer_api
.
get_submission_to_assess
(
buffy_sub
[
'uuid'
],
REQUIRED_GRADED_BY
)
self
.
assertIsNone
(
sub
)
# 11) Xander comes along and submits.
xander_sub
,
xander
=
self
.
_create_student_and_submission
(
"Xander"
,
"Xander's answer"
)
...
...
apps/openassessment/xblock/peer_assessment_mixin.py
View file @
cfd0a751
...
...
@@ -224,8 +224,7 @@ class PeerAssessmentMixin(object):
try
:
peer_submission
=
peer_api
.
get_submission_to_assess
(
self
.
submission_uuid
,
assessment
[
"must_be_graded_by"
],
True
assessment
[
"must_be_graded_by"
]
)
self
.
runtime
.
publish
(
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