Scheduled emails show "unsubscribe" link if waffle switch `schedules.course_update_show_unsubscribe` is enabled, and settings.ACE_ENABLED_POLICIES respects `bulk_email_optout`. API endpoint allows GET/POST requests, which: * GET asks for confirmation of opt-out * POST accepts "unsubscribe" or "cancel", where "unsubscribe" creates the Optout entry, and "cancel" does nothing. Fixes flaky tests: * The resolvers handle users in "bins", which are groups that depend on the user ID. * The test user ID varies depending on the test order. * This change ensures that the bin requested matches the user for the test.
29 lines
916 B
Python
29 lines
916 B
Python
"""
|
|
Contains configuration for schedules app
|
|
"""
|
|
from __future__ import absolute_import
|
|
|
|
from openedx.core.djangoapps.waffle_utils import (
|
|
WaffleFlagNamespace, CourseWaffleFlag, WaffleFlag,
|
|
WaffleSwitch, WaffleSwitchNamespace,
|
|
)
|
|
|
|
WAFFLE_FLAG_NAMESPACE = WaffleFlagNamespace(name=u'schedules')
|
|
WAFFLE_SWITCH_NAMESPACE = WaffleSwitchNamespace(name=u'schedules')
|
|
|
|
CREATE_SCHEDULE_WAFFLE_FLAG = CourseWaffleFlag(
|
|
waffle_namespace=WAFFLE_FLAG_NAMESPACE,
|
|
flag_name=u'create_schedules_for_course',
|
|
flag_undefined_default=False
|
|
)
|
|
|
|
COURSE_UPDATE_WAFFLE_FLAG = CourseWaffleFlag(
|
|
waffle_namespace=WAFFLE_FLAG_NAMESPACE,
|
|
flag_name=u'send_updates_for_course',
|
|
flag_undefined_default=False
|
|
)
|
|
|
|
DEBUG_MESSAGE_WAFFLE_FLAG = WaffleFlag(WAFFLE_FLAG_NAMESPACE, u'enable_debugging')
|
|
|
|
COURSE_UPDATE_SHOW_UNSUBSCRIBE_WAFFLE_SWITCH = WaffleSwitch(WAFFLE_SWITCH_NAMESPACE, u'course_update_show_unsubscribe')
|