AA-197: Provide cert upgrade info to learning MFE
Specifically, pass the MFE the audit access expiration date and let it know when the upgrade deadline has passed, by not passing any verified mode information along.
This commit is contained in:
@@ -21,7 +21,6 @@ from openedx.core.djangoapps.django_comment_common.models import Role
|
||||
from openedx.core.djangoapps.schedules.models import Schedule
|
||||
from openedx.core.djangoapps.waffle_utils import WaffleFlag, WaffleFlagNamespace
|
||||
from openedx.features.course_duration_limits.access import get_user_course_expiration_date, get_user_course_duration
|
||||
from openedx.features.course_duration_limits.models import CourseDurationLimitConfig
|
||||
from student.models import CourseEnrollment
|
||||
from xmodule.partitions.partitions_service import get_all_partitions_for_course, get_user_partition_groups
|
||||
|
||||
@@ -333,7 +332,8 @@ def get_base_experiment_metadata_context(course, user, enrollment, user_enrollme
|
||||
user, enrollment, course
|
||||
)
|
||||
|
||||
deadline, duration = get_audit_access_expiration(user, course)
|
||||
duration = get_user_course_duration(user, course)
|
||||
deadline = duration and get_user_course_expiration_date(user, course)
|
||||
|
||||
return {
|
||||
'upgrade_link': upgrade_link,
|
||||
@@ -355,16 +355,6 @@ def get_base_experiment_metadata_context(course, user, enrollment, user_enrollme
|
||||
}
|
||||
|
||||
|
||||
def get_audit_access_expiration(user, course):
|
||||
"""
|
||||
Return the expiration date and course duration for the user's audit access to this course.
|
||||
"""
|
||||
if not CourseDurationLimitConfig.enabled_for_enrollment(user, course):
|
||||
return None, None
|
||||
|
||||
return get_user_course_expiration_date(user, course), get_user_course_duration(user, course)
|
||||
|
||||
|
||||
# TODO: clean up as part of REVEM-199 (START)
|
||||
def get_program_context(course, user_enrollments):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user