Files
edx-platform/cms/djangoapps/contentstore/errors.py
Awais Jibran 9722e37492 Enable Course Olx Validation during Course Import (#27300)
* Enable import failure and email with Errors/Warnings

This PR enables course import failure in case of olx validation errors. Here is the flow.
  * Course Import tries to import foo.tar.gz into their course shell
  * Course olx contains validation errors
  * During course import, olx is validated and import is failed with the error message "Course olx validation failed. Please check your email."
  * System generates an email with ERRORs & WARNINGs in the body of the email.

This PR also adds a waffle flag contentstore.bypass_olx_failure. The purpose of this test flag is to allow course teams to unblock by enabling them to bypass the
the olx-validation failure.
The workaround is shared on the ticket TNL8214.

* Disable olx validation out of the box.
2021-04-16 18:45:59 +05:00

21 lines
1.2 KiB
Python

"""
User facing error messages during course import and export
"""
from django.utils.translation import ugettext as _
COURSE_ALREADY_EXIST = _('Aborting import because a course with this id: {} already exists.')
COURSE_PERMISSION_DENIED = _('Permission denied. You do not have write access to this course.')
ERROR_WHILE_READING = _('Error while reading {}. Check file for XML errors.')
FAILED_TO_IMPORT_MODULE = _('Failed to import module: {} at location: {}')
FILE_MISSING = _('Could not find the {0} file in the package.')
FILE_NOT_FOUND = _('Uploaded Tar file not found. Try again.')
INVALID_FILE_TYPE = _('We only support uploading a .tar.gz file.')
LIBRARY_ALREADY_EXIST = _('Aborting import since a library with this id already exists.')
OLX_VALIDATION_FAILED = _('Course olx validation failed. Please check your email.')
PERMISSION_DENIED = _('Permission denied')
UNKNOWN_ERROR_IN_IMPORT = _('Unknown error while importing course.')
UNKNOWN_ERROR_IN_UNPACKING = _('An Unknown error occurred during the unpacking step.')
UNKNOWN_USER_ID = _('Unknown User ID: {0}')
UNSAFE_TAR_FILE = _('Unsafe tar file. Aborting import.')
USER_PERMISSION_DENIED = _('User permission denied.')