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
a0c0005e
Commit
a0c0005e
authored
Jan 14, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates to the javascript and the grading controller
to handle rubric input
parent
f3e8d01e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
lms/djangoapps/open_ended_grading/staff_grading_service.py
+6
-4
lms/static/coffee/src/staff_grading/staff_grading.coffee
+3
-2
No files found.
lms/djangoapps/open_ended_grading/staff_grading_service.py
View file @
a0c0005e
...
...
@@ -115,7 +115,7 @@ class StaffGradingService(GradingService):
'grader_id'
:
grader_id
})
def
save_grade
(
self
,
course_id
,
grader_id
,
submission_id
,
score
,
feedback
,
skipped
):
def
save_grade
(
self
,
course_id
,
grader_id
,
submission_id
,
score
,
feedback
,
skipped
,
rubric_scores
):
"""
Save a score and feedback for a submission.
...
...
@@ -132,7 +132,8 @@ class StaffGradingService(GradingService):
'score'
:
score
,
'feedback'
:
feedback
,
'grader_id'
:
grader_id
,
'skipped'
:
skipped
}
'skipped'
:
skipped
,
'rubric_scores'
:
rubric_scores
}
return
self
.
post
(
self
.
save_grade_url
,
data
=
data
)
...
...
@@ -297,7 +298,7 @@ def save_grade(request, course_id):
if
request
.
method
!=
'POST'
:
raise
Http404
required
=
set
([
'score'
,
'feedback'
,
'submission_id'
,
'location'
])
required
=
set
([
'score'
,
'feedback'
,
'submission_id'
,
'location'
,
'rubric_scores'
])
actual
=
set
(
request
.
POST
.
keys
())
missing
=
required
-
actual
if
len
(
missing
)
>
0
:
...
...
@@ -316,7 +317,8 @@ def save_grade(request, course_id):
p
[
'submission_id'
],
p
[
'score'
],
p
[
'feedback'
],
skipped
)
skipped
,
p
[
'rubric_scores'
])
except
GradingServiceError
:
log
.
exception
(
"Error saving grade"
)
return
_err_response
(
'Could not connect to grading service'
)
...
...
lms/static/coffee/src/staff_grading/staff_grading.coffee
View file @
a0c0005e
...
...
@@ -227,6 +227,7 @@ class StaffGrading
if
score
==
undefined
return
# show button if we have scores for all categories
@
state
=
state_graded
@
submit_button
.
show
()
...
...
@@ -243,7 +244,7 @@ class StaffGrading
# get the score for each one
for
i
in
[
0
..(
num_categories
-
1
)]
score
=
$
(
"input[name='score-selection-
#{
i
}
']:checked"
).
val
()
score_lst
.
append
(
score
)
score_lst
.
push
(
score
)
return
score_lst
...
...
@@ -431,7 +432,7 @@ class StaffGrading
# for now, just create an instance and load it...
mock_backend
=
tru
e
mock_backend
=
fals
e
ajax_url
=
$
(
'.staff-grading'
).
data
(
'ajax_url'
)
backend
=
new
StaffGradingBackend
(
ajax_url
,
mock_backend
)
...
...
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