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
7b65f561
Commit
7b65f561
authored
Jan 17, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add service to query controller for eta of submission and to check if name is unique
parent
c487e026
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
lms/djangoapps/open_ended_grading/controller_query_service.py
+37
-0
No files found.
lms/djangoapps/open_ended_grading/controller_query_service.py
0 → 100644
View file @
7b65f561
import
json
import
logging
import
requests
from
requests.exceptions
import
RequestException
,
ConnectionError
,
HTTPError
import
sys
from
grading_service
import
GradingService
from
grading_service
import
GradingServiceError
from
django.conf
import
settings
from
django.http
import
HttpResponse
,
Http404
log
=
logging
.
getLogger
(
__name__
)
class
ControllerQueryService
(
GradingService
):
"""
Interface to staff grading backend.
"""
def
__init__
(
self
,
config
):
super
(
ControllerQuery
,
self
)
.
__init__
(
config
)
self
.
check_eta_url
=
self
.
url
+
'/get_submission_eta/'
self
.
is_unique_url
=
self
.
url
+
'/is_name_unique/'
def
check_if_name_is_unique
(
self
,
location
,
problem_id
,
course_id
):
params
=
{
'course_id'
:
course_id
,
'location'
:
location
,
'problem_id'
:
problem_id
}
response
=
self
.
get
(
self
.
is_unique_url
,
params
)
return
response
def
check_for_eta
(
self
,
location
):
params
=
{
'location'
:
location
,
}
response
=
self
.
get
(
self
.
check_eta_url
,
params
)
return
response
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