Merge remote-tracking branch 'edx/master' into opaque-keys-merge-master

Conflicts:
	common/lib/xmodule/xmodule/video_module/video_handlers.py
This commit is contained in:
Calen Pennington
2014-05-15 10:25:08 -04:00
8 changed files with 1596 additions and 815 deletions

View File

@@ -36,6 +36,9 @@ def import_static_content(
policy = {}
verbose = True
mimetypes.add_type('application/octet-stream', '.sjson')
mimetypes.add_type('application/octet-stream', '.srt')
mimetypes_list = mimetypes.types_map.values()
for dirname, _, filenames in os.walk(static_dir):

View File

@@ -194,12 +194,27 @@ class VideoStudentViewHandlers(object):
transcript_name = self.sub
if transcript_name:
<<<<<<< HEAD
course = self.descriptor.runtime.modulestore.get_course(self.course_id)
if course.static_asset_path:
=======
course_location = CourseDescriptor.id_to_location(self.course_id)
# Get the asset path for course
asset_path = None
if hasattr(self.descriptor.runtime, 'modulestore'):
course = self.descriptor.runtime.modulestore.get_item(course_location)
asset_path = course.static_asset_path
else:
# Handle XML Courses that don't have modulestore in the runtime
asset_path = getattr(self.descriptor, 'data_dir', None)
if asset_path:
>>>>>>> edx/master
response = Response(
status=307,
location='/static/{0}/{1}'.format(
course.static_asset_path,
asset_path,
subs_filename(transcript_name, self.transcript_language)
)
)