WL-477
This commit is contained in:
@@ -52,6 +52,7 @@ from instructor_task.subtasks import (
|
||||
)
|
||||
from util.query import use_read_replica_if_available
|
||||
from util.date_utils import get_default_time_display
|
||||
from openedx.core.djangoapps.theming import helpers as theming_helpers
|
||||
|
||||
log = logging.getLogger('edx.celery.task')
|
||||
|
||||
@@ -421,7 +422,10 @@ def _get_source_address(course_id, course_title, truncate=True):
|
||||
return from_addr_format.format(
|
||||
course_title=course_title_no_quotes,
|
||||
course_name=course_name,
|
||||
from_email=settings.BULK_EMAIL_DEFAULT_FROM_EMAIL,
|
||||
from_email=theming_helpers.get_value(
|
||||
'bulk_email_default_from_email',
|
||||
settings.BULK_EMAIL_DEFAULT_FROM_EMAIL
|
||||
)
|
||||
)
|
||||
|
||||
from_addr = format_address(course_title_no_quotes)
|
||||
|
||||
@@ -25,6 +25,7 @@ from openedx.core.djangoapps.user_api.models import UserPreference
|
||||
from microsite_configuration import microsite
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.modulestore.exceptions import ItemNotFoundError
|
||||
from openedx.core.djangoapps.theming import helpers as theming_helpers
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@@ -426,7 +427,7 @@ def send_mail_to_student(student, param_dict, language=None):
|
||||
|
||||
# Email subject *must not* contain newlines
|
||||
subject = ''.join(subject.splitlines())
|
||||
from_address = microsite.get_value(
|
||||
from_address = theming_helpers.get_value(
|
||||
'email_from_address',
|
||||
settings.DEFAULT_FROM_EMAIL
|
||||
)
|
||||
|
||||
@@ -109,6 +109,7 @@ from opaque_keys.edx.keys import CourseKey, UsageKey
|
||||
from opaque_keys.edx.locations import SlashSeparatedCourseKey
|
||||
from opaque_keys import InvalidKeyError
|
||||
from openedx.core.djangoapps.course_groups.cohorts import is_course_cohorted
|
||||
from openedx.core.djangoapps.theming import helpers as theming_helpers
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -1733,7 +1734,7 @@ def generate_registration_codes(request, course_id):
|
||||
log.exception('Exception at creating pdf file.')
|
||||
pdf_file = None
|
||||
|
||||
from_address = microsite.get_value('email_from_address', settings.DEFAULT_FROM_EMAIL)
|
||||
from_address = theming_helpers.get_value('email_from_address', settings.DEFAULT_FROM_EMAIL)
|
||||
context = {
|
||||
'invoice': sale_invoice,
|
||||
'site_name': site_name,
|
||||
|
||||
@@ -61,6 +61,7 @@ from util.date_utils import get_default_time_display
|
||||
from util.db import outer_atomic
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from django.contrib.staticfiles.storage import staticfiles_storage
|
||||
from openedx.core.djangoapps.theming import helpers as theming_helpers
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@@ -1100,7 +1101,7 @@ class SubmitPhotosView(View):
|
||||
|
||||
subject = _("Verification photos received")
|
||||
message = render_to_string('emails/photo_submission_confirmation.txt', context)
|
||||
from_address = microsite.get_value('default_from_email', settings.DEFAULT_FROM_EMAIL)
|
||||
from_address = theming_helpers.get_value('default_from_email', settings.DEFAULT_FROM_EMAIL)
|
||||
to_address = user.email
|
||||
|
||||
try:
|
||||
@@ -1219,7 +1220,7 @@ def _send_email(user_id, subject, message):
|
||||
Returns:
|
||||
None
|
||||
"""
|
||||
from_address = microsite.get_value(
|
||||
from_address = theming_helpers.get_value(
|
||||
'email_from_address',
|
||||
settings.DEFAULT_FROM_EMAIL
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user