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
3e23b9e1
Commit
3e23b9e1
authored
Feb 15, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1480 from MITx/diana/staff-grading-flagging
Flag submissions from staff grading view
parents
dceb8fee
285e5758
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
6 deletions
+15
-6
lms/djangoapps/open_ended_grading/staff_grading_service.py
+7
-5
lms/djangoapps/open_ended_grading/tests.py
+1
-0
lms/static/coffee/src/staff_grading/staff_grading.coffee
+4
-0
lms/templates/instructor/staff_grading.html
+3
-1
No files found.
lms/djangoapps/open_ended_grading/staff_grading_service.py
View file @
3e23b9e1
...
...
@@ -53,7 +53,7 @@ class MockStaffGradingService(object):
]})
def
save_grade
(
self
,
course_id
,
grader_id
,
submission_id
,
score
,
feedback
,
skipped
,
rubric_scores
):
def
save_grade
(
self
,
course_id
,
grader_id
,
submission_id
,
score
,
feedback
,
skipped
,
rubric_scores
,
submission_flagged
):
return
self
.
get_next
(
course_id
,
'fake location'
,
grader_id
)
...
...
@@ -114,7 +114,7 @@ class StaffGradingService(GradingService):
return
json
.
dumps
(
self
.
_render_rubric
(
response
))
def
save_grade
(
self
,
course_id
,
grader_id
,
submission_id
,
score
,
feedback
,
skipped
,
rubric_scores
):
def
save_grade
(
self
,
course_id
,
grader_id
,
submission_id
,
score
,
feedback
,
skipped
,
rubric_scores
,
submission_flagged
):
"""
Save a score and feedback for a submission.
...
...
@@ -133,7 +133,8 @@ class StaffGradingService(GradingService):
'grader_id'
:
grader_id
,
'skipped'
:
skipped
,
'rubric_scores'
:
rubric_scores
,
'rubric_scores_complete'
:
True
}
'rubric_scores_complete'
:
True
,
'submission_flagged'
:
submission_flagged
}
return
self
.
post
(
self
.
save_grade_url
,
data
=
data
)
...
...
@@ -292,7 +293,7 @@ def save_grade(request, course_id):
if
request
.
method
!=
'POST'
:
raise
Http404
required
=
set
([
'score'
,
'feedback'
,
'submission_id'
,
'location'
,
'rubric_scores[]'
])
required
=
set
([
'score'
,
'feedback'
,
'submission_id'
,
'location'
,
'submission_flagged'
,
'rubric_scores[]'
])
actual
=
set
(
request
.
POST
.
keys
())
missing
=
required
-
actual
if
len
(
missing
)
>
0
:
...
...
@@ -313,7 +314,8 @@ def save_grade(request, course_id):
p
[
'score'
],
p
[
'feedback'
],
skipped
,
p
.
getlist
(
'rubric_scores[]'
))
p
.
getlist
(
'rubric_scores[]'
),
p
[
'submission_flagged'
])
except
GradingServiceError
:
log
.
exception
(
"Error saving grade"
)
return
_err_response
(
'Could not connect to grading service'
)
...
...
lms/djangoapps/open_ended_grading/tests.py
View file @
3e23b9e1
...
...
@@ -100,6 +100,7 @@ class TestStaffGradingService(ct.PageLoader):
'feedback'
:
'great!'
,
'submission_id'
:
'123'
,
'location'
:
self
.
location
,
'submission_flagged'
:
"true"
,
'rubric_scores[]'
:
[
'1'
,
'2'
]}
r
=
self
.
check_for_post_code
(
200
,
url
,
data
)
...
...
lms/static/coffee/src/staff_grading/staff_grading.coffee
View file @
3e23b9e1
...
...
@@ -170,6 +170,7 @@ class @StaffGrading
@
feedback_area
=
$
(
'.feedback-area'
)
@
score_selection_container
=
$
(
'.score-selection-container'
)
@
grade_selection_container
=
$
(
'.grade-selection-container'
)
@
flag_submission_checkbox
=
$
(
'.flag-checkbox'
)
@
submit_button
=
$
(
'.submit-button'
)
@
action_button
=
$
(
'.action-button'
)
...
...
@@ -255,6 +256,7 @@ class @StaffGrading
submission_id
:
@
submission_id
location
:
@
location
skipped
:
true
submission_flagged
:
false
@
backend
.
post
(
'save_grade'
,
data
,
@
ajax_callback
)
get_problem_list
:
()
->
...
...
@@ -268,6 +270,7 @@ class @StaffGrading
feedback
:
@
feedback_area
.
val
()
submission_id
:
@
submission_id
location
:
@
location
submission_flagged
:
@
flag_submission_checkbox
.
is
(
':checked'
)
@
backend
.
post
(
'save_grade'
,
data
,
@
ajax_callback
)
...
...
@@ -325,6 +328,7 @@ class @StaffGrading
@
error_container
.
html
(
@
error_msg
)
@
message_container
.
toggle
(
@
message
!=
""
)
@
error_container
.
toggle
(
@
error_msg
!=
""
)
@
flag_submission_checkbox
.
prop
(
'checked'
,
false
)
# only show the grading elements when we are not in list view or the state
...
...
lms/templates/instructor/staff_grading.html
View file @
3e23b9e1
...
...
@@ -78,7 +78,9 @@
<h3>
Written Feedback
</h3>
<textarea
name=
"feedback"
placeholder=
"Feedback for student (optional)"
class=
"feedback-area"
cols=
"70"
></textarea>
</div>
<p>
Flag as inappropriate content for later review
<input
class=
"flag-checkbox"
type=
"checkbox"
/>
</p>
<div
class=
"submission"
>
...
...
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