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
143fe3ac
Commit
143fe3ac
authored
Dec 18, 2014
by
muzaffaryousaf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding the test for assessing cancelled submission.
TNL-900
parent
bac7e995
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
openassessment/assessment/test/test_peer.py
+23
-2
No files found.
openassessment/assessment/test/test_peer.py
View file @
143fe3ac
...
@@ -1337,14 +1337,35 @@ class TestPeerApi(CacheResetTest):
...
@@ -1337,14 +1337,35 @@ class TestPeerApi(CacheResetTest):
jane_assessments
=
peer_api
.
get_assessments
(
jane_sub
[
'uuid'
],
scored_only
=
False
)
jane_assessments
=
peer_api
.
get_assessments
(
jane_sub
[
'uuid'
],
scored_only
=
False
)
self
.
assertEqual
(
0
,
len
(
jane_assessments
))
self
.
assertEqual
(
0
,
len
(
jane_assessments
))
def
test_get_submission_to_assess_no_workflow
(
self
):
def
test_get_submission_to_assess_no_workflow
(
self
):
# Try to retrieve a submission to assess when the student
# Try to retrieve a submission to assess when the student
# doing the assessment hasn't yet submitted.
# doing the assessment hasn't yet submitted.
with
self
.
assertRaises
(
peer_api
.
PeerAssessmentWorkflowError
):
with
self
.
assertRaises
(
peer_api
.
PeerAssessmentWorkflowError
):
peer_api
.
get_submission_to_assess
(
"no_such_submission"
,
"scorer ID"
)
peer_api
.
get_submission_to_assess
(
"no_such_submission"
,
"scorer ID"
)
def
test_get_submission_to_assess_but_cancelled
(
self
):
buffy_sub
,
buffy
=
self
.
_create_student_and_submission
(
"Buffy"
,
"Buffy's answer"
)
xander_sub
,
xander
=
self
.
_create_student_and_submission
(
"Xander"
,
"Xander's answer"
)
# Check for a workflow for Buffy.
buffy_workflow
=
PeerWorkflow
.
get_by_submission_uuid
(
buffy_sub
[
'uuid'
])
self
.
assertIsNotNone
(
buffy_workflow
)
# Buffy is going to review Xander's submission, so create a workflow
# item for Buffy.
PeerWorkflow
.
create_item
(
buffy_workflow
,
xander_sub
[
"uuid"
])
# Cancel the Xander's submission.
xander_workflow
=
PeerWorkflow
.
get_by_submission_uuid
(
xander_sub
[
'uuid'
])
PeerWorkflowCancellation
.
create
(
workflow
=
xander_workflow
,
comments
=
'Cancellation reason'
,
cancelled_by_id
=
buffy
[
'student_id'
]
)
# Check to see if Buffy is able to review Xander's submission.
# She isn't able to get the submission to assess.
item
=
peer_api
.
get_submission_to_assess
(
buffy_sub
[
'uuid'
],
1
)
self
.
assertIsNone
(
item
)
def
test_too_many_assessments_counted_in_score_bug
(
self
):
def
test_too_many_assessments_counted_in_score_bug
(
self
):
# This bug allowed a score to be calculated using more
# This bug allowed a score to be calculated using more
# assessments, than the required number in the problem definition.
# assessments, than the required number in the problem definition.
...
...
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