diff --git a/lms/djangoapps/student_profile/views.py b/lms/djangoapps/student_profile/views.py index dc58795a48..078183c54c 100644 --- a/lms/djangoapps/student_profile/views.py +++ b/lms/djangoapps/student_profile/views.py @@ -4,6 +4,7 @@ from django.http import ( QueryDict, HttpResponse, HttpResponseBadRequest, HttpResponseServerError ) +from django.conf import settings from django_future.csrf import ensure_csrf_cookie from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_http_methods @@ -32,12 +33,14 @@ def index(request): """ user = request.user - return render_to_response( - 'student_profile/index.html', { - 'disable_courseware_js': True, - 'provider_user_states': pipeline.get_provider_user_states(user), - } - ) + context = { + 'disable_courseware_js': True + } + + if settings.FEATURES.get('ENABLE_THIRD_PARTY_AUTH'): + context['provider_user_states'] = pipeline.get_provider_user_states(user) + + return render_to_response('student_profile/index.html', context) @login_required diff --git a/lms/templates/student_profile/index.html b/lms/templates/student_profile/index.html index c2d829b056..87fcde2e96 100644 --- a/lms/templates/student_profile/index.html +++ b/lms/templates/student_profile/index.html @@ -1,5 +1,4 @@ <%! from django.utils.translation import ugettext as _ %> -<%! from third_party_auth import pipeline %> <%namespace name='static' file='/static_content.html'/> <%inherit file="../main.html" /> @@ -25,44 +24,6 @@ -