Commit ad8b068f authored by Glaucia S. Santos's avatar Glaucia S. Santos
Browse files

Fix export courses

parent 236a6eee
......@@ -71,7 +71,7 @@ class ExportCourseView(APIView):
course_material ='course_material')
if course_material:
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)
# If there are any activities of type 'image', its files must be saved here
......@@ -80,7 +80,7 @@ class ExportCourseView(APIView):
for activity in unit.activities.all():
if activity.type == 'image': # check if the current activity is of 'image' type
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)
except ValueError:
# 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