Merge pull request #27334 from edx/aehsan/Van-434/cta_dialogue_box_added

CTA dialogue added
This commit is contained in:
Adeel Ehsan
2021-05-07 05:42:56 +05:00
committed by GitHub
11 changed files with 174 additions and 6 deletions

View File

@@ -26,8 +26,7 @@ from common.djangoapps.student.views import (
SETTING_CHANGE_INITIATED,
confirm_email_change,
do_email_change_request,
validate_new_email
)
validate_new_email)
from common.djangoapps.third_party_auth.views import inactive_user_view
from common.djangoapps.util.testing import EventTestMixin
from lms.djangoapps.courseware.toggles import COURSEWARE_PROCTORING_IMPROVEMENTS

View File

@@ -741,6 +741,8 @@ def student_dashboard(request): # lint-amnesty, pylint: disable=too-many-statem
enr for enr in course_enrollments if entitlement.enrollment_course_run.course_id != enr.course_id
]
show_account_activation_popup = request.COOKIES.get(settings.SHOW_ACTIVATE_CTA_POPUP_COOKIE_NAME, None)
context = {
'urls': urls,
'programs_data': programs_data,
@@ -772,6 +774,7 @@ def student_dashboard(request): # lint-amnesty, pylint: disable=too-many-statem
'denied_banner': denied_banner,
'billing_email': settings.PAYMENT_SUPPORT_EMAIL,
'user': user,
'show_account_activation_popup': show_account_activation_popup,
'logout_url': reverse('logout'),
'platform_name': platform_name,
'enrolled_courses_either_paid': enrolled_courses_either_paid,
@@ -826,4 +829,8 @@ def student_dashboard(request): # lint-amnesty, pylint: disable=too-many-statem
'resume_button_urls': resume_button_urls
})
return render_to_response('dashboard.html', context)
response = render_to_response('dashboard.html', context)
if show_account_activation_popup:
response.delete_cookie(settings.SHOW_ACTIVATE_CTA_POPUP_COOKIE_NAME)
return response