Commit 31f2e42c by Chris Dodge

be sure to take platform_name from microsite config paths in the dashboard

add some more microsite aware config checks
parent fc7b35c7
...@@ -498,6 +498,8 @@ def is_course_blocked(request, redeemed_registration_codes, course_key): ...@@ -498,6 +498,8 @@ def is_course_blocked(request, redeemed_registration_codes, course_key):
def dashboard(request): def dashboard(request):
user = request.user user = request.user
platform_name = microsite.get_value("platform_name", settings.PLATFORM_NAME)
# for microsites, we want to filter and only show enrollments for courses within # for microsites, we want to filter and only show enrollments for courses within
# the microsites 'ORG' # the microsites 'ORG'
course_org_filter = microsite.get_value('course_org_filter') course_org_filter = microsite.get_value('course_org_filter')
...@@ -541,7 +543,7 @@ def dashboard(request): ...@@ -541,7 +543,7 @@ def dashboard(request):
if not user.is_active: if not user.is_active:
message = render_to_string( message = render_to_string(
'registration/activate_account_notice.html', 'registration/activate_account_notice.html',
{'email': user.email, 'platform_name': settings.PLATFORM_NAME} {'email': user.email, 'platform_name': platform_name}
) )
# Global staff can see what courses errored on their dashboard # Global staff can see what courses errored on their dashboard
...@@ -686,7 +688,7 @@ def dashboard(request): ...@@ -686,7 +688,7 @@ def dashboard(request):
'user': user, 'user': user,
'duplicate_provider': None, 'duplicate_provider': None,
'logout_url': reverse(logout_user), 'logout_url': reverse(logout_user),
'platform_name': settings.PLATFORM_NAME, 'platform_name': platform_name,
'enrolled_courses_either_paid': enrolled_courses_either_paid, 'enrolled_courses_either_paid': enrolled_courses_either_paid,
'provider_states': [], 'provider_states': [],
'order_history_list': order_history_list, 'order_history_list': order_history_list,
...@@ -726,9 +728,11 @@ def _create_recent_enrollment_message(course_enrollment_pairs, course_modes): ...@@ -726,9 +728,11 @@ def _create_recent_enrollment_message(course_enrollment_pairs, course_modes):
for course, enrollment in recently_enrolled_courses for course, enrollment in recently_enrolled_courses
] ]
platform_name = microsite.get_value('platform_name', settings.PLATFORM_NAME)
return render_to_string( return render_to_string(
'enrollment/course_enrollment_message.html', 'enrollment/course_enrollment_message.html',
{'course_enrollment_messages': messages, 'platform_name': settings.PLATFORM_NAME} {'course_enrollment_messages': messages, 'platform_name': platform_name}
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment