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
85b5190c
Commit
85b5190c
authored
Dec 10, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix login hack. Uses new return-error-msg-if-not-logged-in behavior
parent
c9d399d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lms/djangoapps/instructor/staff_grading_service.py
+4
-2
No files found.
lms/djangoapps/instructor/staff_grading_service.py
View file @
85b5190c
...
@@ -89,7 +89,9 @@ class StaffGradingService(object):
...
@@ -89,7 +89,9 @@ class StaffGradingService(object):
Returns the result of operation(). Does not catch exceptions.
Returns the result of operation(). Does not catch exceptions.
"""
"""
response
=
operation
()
response
=
operation
()
if
(
response
.
status_code
==
302
):
if
(
response
.
json
and
response
.
json
.
get
(
'success'
)
==
False
and
response
.
json
.
get
(
'error'
)
==
'login_required'
):
# apparrently we aren't logged in. Try to fix that.
# apparrently we aren't logged in. Try to fix that.
r
=
self
.
_login
()
r
=
self
.
_login
()
if
r
and
not
r
.
get
(
'success'
):
if
r
and
not
r
.
get
(
'success'
):
...
@@ -116,7 +118,7 @@ class StaffGradingService(object):
...
@@ -116,7 +118,7 @@ class StaffGradingService(object):
Raises:
Raises:
GradingServiceError: something went wrong with the connection.
GradingServiceError: something went wrong with the connection.
"""
"""
op
=
lambda
:
self
.
session
.
get
(
self
.
get_problem_list_url
,
op
=
lambda
:
self
.
session
.
get
(
self
.
get_problem_list_url
,
allow_redirects
=
False
,
allow_redirects
=
False
,
params
=
{
'course_id'
:
course_id
,
params
=
{
'course_id'
:
course_id
,
'grader_id'
:
grader_id
})
'grader_id'
:
grader_id
})
...
...
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