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
87dadd40
Commit
87dadd40
authored
Oct 31, 2012
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address some of Cale's feedback
parent
34c442a1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
8 deletions
+4
-8
common/lib/xmodule/xmodule/modulestore/__init__.py
+1
-0
common/lib/xmodule/xmodule/modulestore/xml_importer.py
+2
-4
lms/djangoapps/courseware/views.py
+1
-4
No files found.
common/lib/xmodule/xmodule/modulestore/__init__.py
View file @
87dadd40
...
...
@@ -377,6 +377,7 @@ class ModuleStore(object):
return
courses
class
ModuleStoreBase
(
ModuleStore
):
'''
Implement interface functionality that can be shared.
...
...
common/lib/xmodule/xmodule/modulestore/xml_importer.py
View file @
87dadd40
...
...
@@ -41,9 +41,8 @@ def import_static_content(modules, data_dir, static_content_store, target_locati
content_loc
=
StaticContent
.
compute_location
(
target_location_namespace
.
org
,
target_location_namespace
.
course
,
fullname_with_subpath
)
mime_type
=
mimetypes
.
guess_type
(
filename
)[
0
]
f
=
open
(
content_path
,
'rb'
)
with
open
(
content_path
,
'rb'
)
as
f
:
data
=
f
.
read
()
f
.
close
()
content
=
StaticContent
(
content_loc
,
filename
,
mime_type
,
data
)
...
...
@@ -76,9 +75,8 @@ def verify_content_links(module, base_dir, static_content_store, link, remap_dic
filename
=
os
.
path
.
basename
(
path
)
mime_type
=
mimetypes
.
guess_type
(
filename
)[
0
]
f
=
open
(
static_pathname
,
'rb'
)
with
open
(
static_pathname
,
'rb'
)
as
f
:
data
=
f
.
read
()
f
.
close
()
content
=
StaticContent
(
content_loc
,
filename
,
mime_type
,
data
)
...
...
lms/djangoapps/courseware/views.py
View file @
87dadd40
...
...
@@ -363,10 +363,7 @@ def static_tab(request, course_id, tab_slug):
if
tab
is
None
:
raise
Http404
cache
=
StudentModuleCache
.
cache_for_descriptor_descendents
(
course
.
id
,
request
.
user
,
course
,
depth
=
2
)
contents
=
tabs
.
get_static_tab_contents
(
request
,
cache
,
course
,
tab
)
contents
=
tabs
.
get_static_tab_contents
(
request
,
None
,
course
,
tab
)
if
contents
is
None
:
raise
Http404
...
...
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