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
b9460c5e
Commit
b9460c5e
authored
Dec 24, 2014
by
muhammad-ammar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix1
parent
92d41500
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletions
+17
-1
openassessment/assessment/api/peer.py
+5
-0
openassessment/assessment/models/peer.py
+10
-0
openassessment/xblock/peer_assessment_mixin.py
+2
-1
No files found.
openassessment/assessment/api/peer.py
View file @
b9460c5e
...
...
@@ -661,6 +661,8 @@ def get_submission_to_assess(submission_uuid, graded_by):
"""
workflow
=
PeerWorkflow
.
get_by_submission_uuid
(
submission_uuid
)
if
workflow
.
is_cancelled
:
return
None
if
not
workflow
:
raise
PeerAssessmentWorkflowError
(
u"A Peer Assessment Workflow does not exist for the student "
...
...
@@ -959,8 +961,11 @@ def cancel_submission_peer_workflow(submission_uuid, comments, cancelled_by_id):
comments (str): The reason for cancellation.
cancelled_by_id (str): The ID of the user who cancelled the peer workflow.
"""
from
nose.tools
import
set_trace
;
set_trace
()
try
:
workflow
=
PeerWorkflow
.
objects
.
get
(
submission_uuid
=
submission_uuid
)
return
PeerWorkflowCancellation
.
create
(
workflow
=
workflow
,
comments
=
comments
,
cancelled_by_id
=
cancelled_by_id
)
except
(
PeerWorkflow
.
DoesNotExist
,
...
...
openassessment/assessment/models/peer.py
View file @
b9460c5e
...
...
@@ -119,6 +119,16 @@ class PeerWorkflow(models.Model):
ordering
=
[
"created_at"
,
"id"
]
app_label
=
"assessment"
@property
def
is_cancelled
(
self
):
"""
Check if workflow is cancelled?
Returns:
True/False
"""
return
bool
(
self
.
cancellations
.
exists
())
@classmethod
def
get_by_submission_uuid
(
cls
,
submission_uuid
):
"""
...
...
openassessment/xblock/peer_assessment_mixin.py
View file @
b9460c5e
...
...
@@ -72,7 +72,7 @@ class PeerAssessmentMixin(object):
)
return
{
'success'
:
False
,
'msg'
:
self
.
_
(
'This feedback has already been submitted.'
),
'msg'
:
self
.
_
(
'This feedback has already been submitted
or the submission has been cancelled
.'
),
}
assessment_ui_model
=
self
.
get_assessment_module
(
'peer-assessment'
)
...
...
@@ -267,6 +267,7 @@ class PeerAssessmentMixin(object):
"""
peer_submission
=
False
try
:
from
nose.tools
import
set_trace
;
set_trace
()
peer_submission
=
peer_api
.
get_submission_to_assess
(
self
.
submission_uuid
,
assessment
[
"must_be_graded_by"
]
...
...
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