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
40f34d19
Commit
40f34d19
authored
Dec 04, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add initial mock of get_problems call
parent
1d87dab3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletions
+16
-1
lms/static/coffee/src/staff_grading/staff_grading.coffee
+16
-1
No files found.
lms/static/coffee/src/staff_grading/staff_grading.coffee
View file @
40f34d19
...
...
@@ -18,6 +18,7 @@ class StaffGradingBackend
mock
:
(
cmd
,
data
)
->
# Return a mock response to cmd and data
# TODO: needs (optional?) arg for problem location
if
cmd
==
'get_next'
@
mock_cnt
++
response
=
...
...
@@ -26,12 +27,26 @@ class StaffGradingBackend
rubric
:
'A rubric! '
+
@
mock_cnt
submission_id
:
@
mock_cnt
max_score
:
2
+
@
mock_cnt
%
3
ml_error_info
:
'ML
error info!
'
+
@
mock_cnt
ml_error_info
:
'ML
accuracy info:
'
+
@
mock_cnt
else
if
cmd
==
'save_grade'
console
.
log
(
"eval:
#{
data
.
score
}
pts, Feedback:
#{
data
.
feedback
}
"
)
response
=
@
mock
(
'get_next'
,
{})
else
if
cmd
==
'get_problems'
# this one didn't have a name in the LMS--lookup fail
p1
=
{
'location'
:
'i4x://MITx/3.091x/problem/open_ended_demo'
,
\
'name'
:
'i4x://MITx/3.091x/problem/open_ended_demo'
,
\
'num_graded'
:
10
,
\
'num_to_grade'
:
90
}
p2
=
{
'location'
:
'i4x://MITx/3.091x/problem/open_ended_demo2'
,
\
'name'
:
'Open ended demo'
,
\
'num_graded'
:
42
,
\
'num_to_grade'
:
63
}
response
=
problems
:
[
p1
,
p2
]
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