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
90076c39
Commit
90076c39
authored
Dec 05, 2012
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add in some new mock responses for our staff grading API
parent
c57b9f32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
lms/static/coffee/src/staff_grading/staff_grading.coffee
+15
-0
No files found.
lms/static/coffee/src/staff_grading/staff_grading.coffee
View file @
90076c39
...
...
@@ -18,10 +18,15 @@ class StaffGradingBackend
mock
:
(
cmd
,
data
)
->
# Return a mock response to cmd and data
# should take a problem id as an argument
if
cmd
==
'get_next'
@
mock_cnt
++
response
=
success
:
true
problem_name
:
'Problem 1'
num_left
:
3
num_total
:
5
prompt
:
'This is a fake prompt'
submission
:
'submission! '
+
@
mock_cnt
rubric
:
'A rubric! '
+
@
mock_cnt
submission_id
:
@
mock_cnt
...
...
@@ -32,6 +37,16 @@ class StaffGradingBackend
console
.
log
(
"eval:
#{
data
.
score
}
pts, Feedback:
#{
data
.
feedback
}
"
)
response
=
@
mock
(
'get_next'
,
{})
# get_probblem_list
# sends in a course_id and a grader_id
# should get back a list of problem_ids, problem_names, num_left, num_total
else
if
cmd
==
'get_problem_list'
response
=
success
:
true
problem_list
:
[
{
problem_id
:
1
,
problem_name
:
"Problem 1"
,
num_left
:
3
,
num_total
:
5
}
{
problem_id
:
2
,
problem_name
:
"Problem 2"
,
num_left
:
1
,
num_total
:
5
}
]
else
response
=
success
:
false
...
...
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