was getting unicode errors when exporting CB22x
This commit is contained in:
@@ -348,6 +348,8 @@ def generate_export_course(request, org, course, name):
|
||||
try:
|
||||
export_to_xml(modulestore('direct'), contentstore(), loc, root_dir, name, modulestore())
|
||||
except SerializationError, e:
|
||||
logging.exception('There was an error exporting course {0}. {1}'.format(course_module.location, unicode(e)))
|
||||
|
||||
unit = None
|
||||
failed_item = None
|
||||
parent = None
|
||||
@@ -380,6 +382,7 @@ def generate_export_course(request, org, course, name):
|
||||
})
|
||||
})
|
||||
except Exception, e:
|
||||
logging.exception('There was an error exporting course {0}. {1}'.format(course_module.location, unicode(e)))
|
||||
return render_to_response('export.html', {
|
||||
'context_course': course_module,
|
||||
'successful_import_redirect_url': '',
|
||||
|
||||
@@ -266,7 +266,7 @@ class VideoDescriptor(VideoFields, TabsEditingDescriptor, EmptyDataRawDescriptor
|
||||
if key in fields and fields[key].default == getattr(self, key):
|
||||
continue
|
||||
if value:
|
||||
xml.set(key, str(value))
|
||||
xml.set(key, unicode(value))
|
||||
|
||||
for source in self.html5_sources:
|
||||
ele = etree.Element('source')
|
||||
|
||||
Reference in New Issue
Block a user