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
10b76220
Commit
10b76220
authored
May 13, 2013
by
Steve Strassmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
declare exports from course, component
parent
b3cc9a11
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
+14
-12
cms/djangoapps/contentstore/views/__init__.py
+2
-6
cms/djangoapps/contentstore/views/assets.py
+3
-3
cms/djangoapps/contentstore/views/component.py
+9
-3
No files found.
cms/djangoapps/contentstore/views/__init__.py
View file @
10b76220
# pylint: disable=W0401, W0511
# TODO: component.py should explicitly enumerate exports with __all__
from
.component
import
*
# TODO: course.py should explicitly enumerate exports with __all__
from
.course
import
*
# Disable warnings about import from wildcard
# All files below declare exports with __all__
from
.assets
import
*
from
.checklist
import
*
from
.component
import
*
from
.course
import
*
from
.error
import
*
from
.item
import
*
from
.preview
import
*
...
...
cms/djangoapps/contentstore/views/assets.py
View file @
10b76220
...
...
@@ -149,9 +149,9 @@ def import_course(request, org, course, name):
location
=
get_location_and_verify_access
(
request
,
org
,
course
,
name
)
if
request
.
method
==
'POST'
:
filename
s
=
request
.
FILES
[
'course-data'
]
.
name
filename
=
request
.
FILES
[
'course-data'
]
.
name
if
not
filename
s
.
endswith
(
'.tar.gz'
):
if
not
filename
.
endswith
(
'.tar.gz'
):
return
HttpResponse
(
json
.
dumps
({
'ErrMsg'
:
'We only support uploading a .tar.gz file.'
}))
data_root
=
path
(
settings
.
GITHUB_REPO_ROOT
)
...
...
@@ -161,7 +161,7 @@ def import_course(request, org, course, name):
if
not
course_dir
.
isdir
():
os
.
mkdir
(
course_dir
)
temp_filepath
=
course_dir
/
filename
s
temp_filepath
=
course_dir
/
filename
logging
.
debug
(
'importing course to {0}'
.
format
(
temp_filepath
))
...
...
cms/djangoapps/contentstore/views/component.py
View file @
10b76220
...
...
@@ -26,9 +26,15 @@ from models.settings.course_grading import CourseGradingModel
from
.requests
import
get_request_method
,
_xmodule_recurse
from
.access
import
has_access
# TODO: should explicitly enumerate exports with __all__
# to install PIL on MacOSX: 'easy_install http://dist.repoze.org/PIL-1.1.6.tar.gz'
__all__
=
[
'OPEN_ENDED_COMPONENT_TYPES'
,
'ADVANCED_COMPONENT_POLICY_KEY'
,
'edit_subsection'
,
'edit_unit'
,
'assignment_type_update'
,
'create_draft'
,
'publish_draft'
,
'unpublish_unit'
,
'module_info'
]
log
=
logging
.
getLogger
(
__name__
)
...
...
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