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
f3bb4299
Commit
f3bb4299
authored
Feb 07, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get and pass the new submission flagged information through
the controller to the backend.
parent
75449359
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
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
+3
-0
No files found.
lms/djangoapps/open_ended_grading/staff_grading_service.py
View file @
f3bb4299
...
...
@@ -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 @
f3bb4299
...
...
@@ -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 @
f3bb4299
...
...
@@ -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
)
...
...
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