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
ef26e8ba
Commit
ef26e8ba
authored
Sep 25, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Just write the loc name as the key in the policy file
parent
47621b56
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
common/lib/xmodule/xmodule/contentstore/mongo.py
+1
-1
common/lib/xmodule/xmodule/modulestore/xml_importer.py
+1
-1
No files found.
common/lib/xmodule/xmodule/contentstore/mongo.py
View file @
ef26e8ba
...
...
@@ -122,7 +122,7 @@ class MongoContentStore(ContentStore):
self
.
export
(
asset_location
,
output_directory
)
for
attr
,
value
in
asset
.
iteritems
():
if
attr
not
in
[
'_id'
,
'md5'
,
'uploadDate'
,
'length'
,
'chunkSize'
]:
policy
.
setdefault
(
asset_location
.
url
()
,
{})[
attr
]
=
value
policy
.
setdefault
(
asset_location
.
name
,
{})[
attr
]
=
value
with
open
(
assets_policy_file
,
'w'
)
as
f
:
json
.
dump
(
policy
,
f
)
...
...
common/lib/xmodule/xmodule/modulestore/xml_importer.py
View file @
ef26e8ba
...
...
@@ -56,7 +56,7 @@ def import_static_content(modules, course_loc, course_data_path, static_content_
content_loc
=
StaticContent
.
compute_location
(
target_location_namespace
.
org
,
target_location_namespace
.
course
,
fullname_with_subpath
)
policy_ele
=
policy
.
get
(
content_loc
.
url
()
,
{})
policy_ele
=
policy
.
get
(
content_loc
.
name
,
{})
displayname
=
policy_ele
.
get
(
'displayname'
,
filename
)
locked
=
policy_ele
.
get
(
'locked'
,
False
)
mime_type
=
policy_ele
.
get
(
'contentType'
,
mimetypes
.
guess_type
(
filename
)[
0
])
...
...
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