Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
MOOC packages by hacklab
django-courses
Commits
f4a9b1ff
Commit
f4a9b1ff
authored
May 15, 2020
by
Fernando Ribeiro
Browse files
Merge branch 'develop' into 'master'
Develop into master See merge request
!5
parents
11ef91a2
ad8b068f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
courses/import_export/views.py
courses/import_export/views.py
+2
-2
No files found.
courses/import_export/views.py
View file @
f4a9b1ff
...
...
@@ -71,7 +71,7 @@ class ExportCourseView(APIView):
course_material
=
course_serializer
.
data
.
get
(
'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
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
)
except
ValueError
:
# There is no image file associated with the activity yet
...
...
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