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
5d9fad5a
Commit
5d9fad5a
authored
Aug 14, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanups before pull request
parent
e4fb9ec6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
13 deletions
+2
-13
lms/djangoapps/courseware/access.py
+1
-1
lms/djangoapps/courseware/module_render.py
+1
-10
lms/djangoapps/courseware/views.py
+0
-2
No files found.
lms/djangoapps/courseware/access.py
View file @
5d9fad5a
...
...
@@ -14,7 +14,7 @@ from xmodule.timeparse import parse_time
from
xmodule.x_module
import
XModule
,
XModuleDescriptor
DEBUG_ACCESS
=
Tru
e
DEBUG_ACCESS
=
Fals
e
log
=
logging
.
getLogger
(
__name__
)
...
...
lms/djangoapps/courseware/module_render.py
View file @
5d9fad5a
...
...
@@ -143,15 +143,12 @@ def get_module(user, request, location, student_module_cache, position=None):
Returns: xmodule instance
'''
# has_access below needs an actual Location
location
=
Location
(
location
)
descriptor
=
modulestore
()
.
get_item
(
location
)
# Short circuit--if the user shouldn't have access, bail without doing any work
if
not
has_access
(
user
,
descriptor
,
'load'
):
return
None
#TODO Only check the cache if this module can possibly have state
instance_module
=
None
shared_module
=
None
...
...
@@ -165,22 +162,16 @@ def get_module(user, request, location, student_module_cache, position=None):
shared_module
=
student_module_cache
.
lookup
(
descriptor
.
category
,
shared_state_key
)
instance_state
=
instance_module
.
state
if
instance_module
is
not
None
else
None
shared_state
=
shared_module
.
state
if
shared_module
is
not
None
else
None
# TODO (vshnayder): fix hardcoded urls (use reverse)
# Setup system context for module instance
ajax_url
=
reverse
(
'modx_dispatch'
,
kwargs
=
dict
(
course_id
=
descriptor
.
location
.
course_id
,
id
=
descriptor
.
location
.
url
(),
dispatch
=
''
),
)
# ajax_url = settings.MITX_ROOT_URL + '/modx/' + descriptor.location.url() + '/'
# Fully qualified callback URL for external queueing system
xqueue_callback_url
=
request
.
build_absolute_uri
(
'/'
)[:
-
1
]
# Trailing slash provided by reverse
xqueue_callback_url
+=
reverse
(
'xqueue_callback'
,
...
...
@@ -225,7 +216,7 @@ def get_module(user, request, location, student_module_cache, position=None):
)
# pass position specified in URL to module through ModuleSystem
system
.
set
(
'position'
,
position
)
system
.
set
(
'DEBUG'
,
settings
.
DEBUG
)
system
.
set
(
'DEBUG'
,
settings
.
DEBUG
)
module
=
descriptor
.
xmodule_constructor
(
system
)(
instance_state
,
shared_state
)
...
...
lms/djangoapps/courseware/views.py
View file @
5d9fad5a
...
...
@@ -333,8 +333,6 @@ def grade_summary(request, course_id):
def
instructor_dashboard
(
request
,
course_id
):
"""Display the instructor dashboard for a course."""
course
=
get_course_with_access
(
request
.
user
,
course_id
,
'staff'
)
if
not
has_access
(
request
.
user
,
course
,
'staff'
):
raise
Http404
# For now, just a static page
context
=
{
'course'
:
course
}
...
...
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