Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
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-ora2
Commits
1b6ea97c
Commit
1b6ea97c
authored
Dec 18, 2014
by
muzaffaryousaf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing the failing test: updating the json handler.
TNL-900
parent
c6f36cb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
openassessment/xblock/staff_info_mixin.py
+3
-3
No files found.
openassessment/xblock/staff_info_mixin.py
View file @
1b6ea97c
...
...
@@ -53,7 +53,7 @@ def require_global_admin(error_key):
return
_decorator
def
require_course_staff
(
error_key
):
def
require_course_staff
(
error_key
,
with_json_handler
=
False
):
"""
Method decorator to restrict access to an XBlock render
method to only course staff.
...
...
@@ -74,7 +74,7 @@ def require_course_staff(error_key):
"STUDENT_INFO"
:
xblock
.
_
(
u"You do not have permission to access student information."
),
}
if
not
xblock
.
is_course_staff
or
xblock
.
in_studio_preview
:
if
(
not
xblock
.
is_course_staff
and
with_json_handler
)
or
xblock
.
in_studio_preview
:
return
xblock
.
render_error
(
permission_errors
[
error_key
])
else
:
return
func
(
xblock
,
*
args
,
**
kwargs
)
...
...
@@ -331,7 +331,7 @@ class StaffInfoMixin(object):
}
@XBlock.json_handler
@require_course_staff
(
"STUDENT_INFO"
)
@require_course_staff
(
"STUDENT_INFO"
,
with_json_handler
=
True
)
def
cancel_submission
(
self
,
data
,
suffix
=
''
):
"""
This will cancel the peer workflow for the particular submission.
...
...
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