Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions cms/djangoapps/contentstore/views/import_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@

from ..storage import course_import_export_storage
from ..tasks import CourseExportTask, CourseImportTask, export_olx, import_olx
from ..toggles import use_new_export_page, use_new_import_page
from ..utils import IMPORTABLE_FILE_TYPES, get_export_url, get_import_url, reverse_course_url, reverse_library_url

__all__ = [
Expand Down Expand Up @@ -99,7 +98,7 @@ def import_handler(request, course_key_string):
return _write_chunk(request, courselike_key)
elif request.method == 'GET': # assume html

if use_new_import_page(courselike_key) and not library:
if not library:
return redirect(get_import_url(courselike_key))
status_url = reverse_course_url(
"import_status_handler", courselike_key, kwargs={'filename': "fillerName"}
Expand Down Expand Up @@ -358,7 +357,7 @@ def export_handler(request, course_key_string):
export_olx.delay(request.user.id, course_key_string, request.LANGUAGE_CODE)
return JsonResponse({'ExportStatus': 1})
elif 'text/html' in requested_format:
if use_new_export_page(course_key) and not library:
if not library:
return redirect(get_export_url(course_key))
return render_to_response('export.html', context)
else:
Expand Down
Loading