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
OpenEdx
edx-platform
Commits
4f49ddbd
Commit
4f49ddbd
authored
Dec 26, 2012
by
ichuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re-add import git info after importing
parent
be0ab928
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletions
+13
-1
cms/djangoapps/contentstore/views.py
+12
-0
common/lib/xmodule/xmodule/modulestore/xml_importer.py
+1
-1
No files found.
cms/djangoapps/contentstore/views.py
View file @
4f49ddbd
...
...
@@ -1289,6 +1289,18 @@ def import_course(request, org, course, name):
module_store
,
course_items
=
import_from_xml
(
modulestore
(
'direct'
),
settings
.
GITHUB_REPO_ROOT
,
[
local_dir
],
load_error_modules
=
False
,
static_content_store
=
contentstore
(),
target_location_namespace
=
Location
(
location
))
# update metadata with github import info
course_module
=
modulestore
()
.
get_item
(
location
)
metadata
=
course_module
.
metadata
if
'import'
not
in
metadata
:
metadata
[
'import'
]
=
{}
importinfo
=
metadata
[
'import'
]
importinfo
[
'local_dir'
]
=
local_dir
importinfo
[
'git_repo'
]
=
git_repo
importinfo
[
'git_branch'
]
=
git_branch
store
=
get_modulestore
(
Location
(
location
));
store
.
update_metadata
(
location
,
course_module
.
metadata
)
# save in mongodb store
# grab error log from import and show that?
message
+=
'Import done.'
...
...
common/lib/xmodule/xmodule/modulestore/xml_importer.py
View file @
4f49ddbd
...
...
@@ -127,7 +127,7 @@ def import_from_xml(store, data_dir, course_dirs=None,
course_location
=
module
.
location
if
static_content_store
is
not
None
:
_namespace_rename
=
target_location_namespace
if
target_location_namespace
is
not
None
else
module_store
.
modules
[
course_id
]
.
location
_namespace_rename
=
target_location_namespace
if
target_location_namespace
is
not
None
else
course_location
#
module_store.modules[course_id].location
# first pass to find everything in /static/
import_static_content
(
module_store
.
modules
[
course_id
],
course_location
,
course_data_path
,
static_content_store
,
...
...
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