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
7cd8e282
Commit
7cd8e282
authored
Dec 02, 2016
by
Eric Fischer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
actually check if staff grade is staff grade
parent
d6fe11e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
openassessment/workflow/models.py
+5
-4
No files found.
openassessment/workflow/models.py
View file @
7cd8e282
...
...
@@ -82,6 +82,8 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel):
DEFAULT_ASSESSMENT_SCORE_PRIORITY
)
STAFF_ANNOTATION_TYPE
=
"staff_defined"
submission_uuid
=
models
.
CharField
(
max_length
=
36
,
db_index
=
True
,
unique
=
True
)
uuid
=
UUIDField
(
version
=
1
,
db_index
=
True
,
unique
=
True
)
...
...
@@ -316,8 +318,8 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel):
old_score
=
sub_api
.
get_latest_score_for_submission
(
self
.
submission_uuid
)
if
(
not
old_score
or
# There is no recorded score
not
old_score
.
get
(
'staff_id'
)
or
# The recorded score is n
ot a staff score
old_score
[
'points_earned'
]
!=
new_staff_score
[
'points_earned'
]
# Previous staff score doesn't match
not
self
.
STAFF_ANNOTATION_TYPE
in
old_score
.
get
(
'annotation_types'
)
or
# N
ot a staff score
old_score
[
'points_earned'
]
!=
new_staff_score
[
'points_earned'
]
# Previous staff score doesn't match
):
# Set the staff score using submissions api, and log that fact
self
.
set_staff_score
(
new_staff_score
)
...
...
@@ -426,7 +428,6 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel):
will be used in the event that this parameter is not provided.
"""
annotation_type
=
"staff_defined"
if
reason
is
None
:
reason
=
"A staff member has defined the score for this submission"
sub_dict
=
sub_api
.
get_submission_and_student
(
self
.
submission_uuid
)
...
...
@@ -440,7 +441,7 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel):
score
[
"points_earned"
],
score
[
"points_possible"
],
annotation_creator
=
score
[
"staff_id"
],
annotation_type
=
annotation_type
,
annotation_type
=
self
.
STAFF_ANNOTATION_TYPE
,
annotation_reason
=
reason
)
...
...
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