Commit f4a9b1ff authored by Fernando Ribeiro's avatar Fernando Ribeiro
Browse files

Merge branch 'develop' into 'master'

Develop into master

See merge request !5
parents 11ef91a2 ad8b068f
...@@ -71,7 +71,7 @@ class ExportCourseView(APIView): ...@@ -71,7 +71,7 @@ class ExportCourseView(APIView):
course_material = course_serializer.data.get('course_material') course_material = course_serializer.data.get('course_material')
if course_material: if course_material:
for course_material_file in course_material['files']: for course_material_file in course_material['files']:
course_material_file_path = urllib.unquote(course_material_file['file']) course_material_file_path = urllib.parse.unquote(course_material_file['file'])
self.add_files_to_export(course_tar_file, course_material_file_path) self.add_files_to_export(course_tar_file, course_material_file_path)
# If there are any activities of type 'image', its files must be saved here # If there are any activities of type 'image', its files must be saved here
...@@ -80,7 +80,7 @@ class ExportCourseView(APIView): ...@@ -80,7 +80,7 @@ class ExportCourseView(APIView):
for activity in unit.activities.all(): for activity in unit.activities.all():
if activity.type == 'image': # check if the current activity is of 'image' type if activity.type == 'image': # check if the current activity is of 'image' type
try: try:
activity_image_file_path = urllib.unquote(activity.image.url) activity_image_file_path = urllib.parse.unquote(activity.image.url)
self.add_files_to_export(course_tar_file, activity_image_file_path) self.add_files_to_export(course_tar_file, activity_image_file_path)
except ValueError: except ValueError:
# There is no image file associated with the activity yet # There is no image file associated with the activity yet
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment