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
d653cd96
Commit
d653cd96
authored
Jun 11, 2014
by
Justin Riley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s/self.system/self.runtime/g
parent
31e3cff6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
common/lib/xmodule/xmodule/proctor_module.py
+10
-10
No files found.
common/lib/xmodule/xmodule/proctor_module.py
View file @
d653cd96
...
...
@@ -134,14 +134,14 @@ class ProctorModule(ProctorFields, XModule):
def
not_released_html
(
self
):
return
Fragment
(
self
.
system
.
render_template
(
'proctor_release.html'
,
{
return
Fragment
(
self
.
runtime
.
render_template
(
'proctor_release.html'
,
{
'element_id'
:
self
.
location
.
html_id
(),
'id'
:
self
.
id
,
'name'
:
self
.
display_name
or
self
.
procset_name
,
'pp'
:
self
.
pp
,
'location'
:
self
.
location
,
'ajax_url'
:
self
.
system
.
ajax_url
,
'is_staff'
:
self
.
system
.
user_is_staff
,
'ajax_url'
:
self
.
runtime
.
ajax_url
,
'is_staff'
:
self
.
runtime
.
user_is_staff
,
}))
...
...
@@ -157,30 +157,30 @@ class ProctorModule(ProctorFields, XModule):
if
self
.
child
.
category
in
[
'sequential'
,
'videosequence'
,
'problemset'
,
'randomize'
]:
html
=
self
.
child
.
render
(
'student_view'
,
context
)
if
self
.
staff_release
:
dishtml
=
self
.
system
.
render_template
(
'proctor_disable.html'
,
{
dishtml
=
self
.
runtime
.
render_template
(
'proctor_disable.html'
,
{
'element_id'
:
self
.
location
.
html_id
(),
'is_staff'
:
self
.
system
.
user_is_staff
,
'ajax_url'
:
self
.
system
.
ajax_url
,
'is_staff'
:
self
.
runtime
.
user_is_staff
,
'ajax_url'
:
self
.
runtime
.
ajax_url
,
})
html
.
content
=
dishtml
+
html
.
content
return
html
# return ajax container, so that we can dynamically check for is_released changing
return
Fragment
(
self
.
system
.
render_template
(
'conditional_ajax.html'
,
{
return
Fragment
(
self
.
runtime
.
render_template
(
'conditional_ajax.html'
,
{
'element_id'
:
self
.
location
.
html_id
(),
'id'
:
self
.
id
,
'ajax_url'
:
self
.
system
.
ajax_url
,
'ajax_url'
:
self
.
runtime
.
ajax_url
,
'depends'
:
''
,
}))
def
handle_ajax
(
self
,
_dispatch
,
_data
):
if
self
.
system
.
user_is_staff
and
_dispatch
==
'release'
:
if
self
.
runtime
.
user_is_staff
and
_dispatch
==
'release'
:
self
.
staff_release
=
True
# return '<html><head><META HTTP-EQUIV="refresh" CONTENT="15"></head><body>Release successful</body></html>'
return
json
.
dumps
({
'html'
:
'staff_release successful'
})
if
self
.
system
.
user_is_staff
and
_dispatch
==
'disable'
:
if
self
.
runtime
.
user_is_staff
and
_dispatch
==
'disable'
:
self
.
staff_release
=
False
return
json
.
dumps
({
'html'
:
'staff_disable successful'
})
# return '<html><head><META HTTP-EQUIV="refresh" CONTENT="15"></head><body>Disable successful</body></html>'
...
...
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