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
eeadf0ba
Commit
eeadf0ba
authored
Aug 20, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let policies be stored in policies/{url_name}/policy.json
* still backcompat with old mode
parent
9f23e437
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
common/lib/xmodule/xmodule/modulestore/xml.py
+7
-2
common/test/data/two_toys/policies/TT_2012_Fall/policy.json
+0
-0
No files found.
common/lib/xmodule/xmodule/modulestore/xml.py
View file @
eeadf0ba
...
@@ -243,8 +243,13 @@ class XMLModuleStore(ModuleStoreBase):
...
@@ -243,8 +243,13 @@ class XMLModuleStore(ModuleStoreBase):
url_name
=
course_data
.
get
(
'url_name'
,
course_data
.
get
(
'slug'
))
url_name
=
course_data
.
get
(
'url_name'
,
course_data
.
get
(
'slug'
))
if
url_name
:
if
url_name
:
policy_path
=
self
.
data_dir
/
course_dir
/
'policies'
/
'{0}.json'
.
format
(
url_name
)
old_policy_path
=
self
.
data_dir
/
course_dir
/
'policies'
/
url_name
/
'policy.json'
policy
=
self
.
load_policy
(
policy_path
,
tracker
)
policy
=
self
.
load_policy
(
old_policy_path
,
tracker
)
# VS[compat]: remove once courses use the policy dirs.
if
policy
==
{}:
old_policy_path
=
self
.
data_dir
/
course_dir
/
'policies'
/
'{0}.json'
.
format
(
url_name
)
policy
=
self
.
load_policy
(
old_policy_path
,
tracker
)
else
:
else
:
policy
=
{}
policy
=
{}
# VS[compat] : 'name' is deprecated, but support it for now...
# VS[compat] : 'name' is deprecated, but support it for now...
...
...
common/test/data/two_toys/policies/TT_2012_Fall.json
→
common/test/data/two_toys/policies/TT_2012_Fall
/policy
.json
View file @
eeadf0ba
File moved
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