From 90be24986ae26120af1527ba672d9dcbbf348123 Mon Sep 17 00:00:00 2001
From: Nimisha Asthagiri <nasthagiri@edx.org>
Date: Sun, 8 Dec 2019 15:48:39 -0500
Subject: [PATCH] student: Remove unused change_setting endpoint

---
 common/djangoapps/student/urls.py             |  1 -
 common/djangoapps/student/views/management.py | 18 ------------------
 2 files changed, 19 deletions(-)

diff --git a/common/djangoapps/student/urls.py b/common/djangoapps/student/urls.py
index 1ba569308f0..f1245355544 100644
--- a/common/djangoapps/student/urls.py
+++ b/common/djangoapps/student/urls.py
@@ -18,7 +18,6 @@ urlpatterns = [
     url(r'^accounts/disable_account_ajax$', views.disable_account_ajax, name="disable_account_ajax"),
     url(r'^accounts/manage_user_standing', views.manage_user_standing, name='manage_user_standing'),
 
-    url(r'^change_setting$', views.change_setting, name='change_setting'),
     url(r'^change_email_settings$', views.change_email_settings, name='change_email_settings'),
 
     url(r'^course_run/{}/refund_status$'.format(settings.COURSE_ID_PATTERN),
diff --git a/common/djangoapps/student/views/management.py b/common/djangoapps/student/views/management.py
index 131a614b1be..bd94854b203 100644
--- a/common/djangoapps/student/views/management.py
+++ b/common/djangoapps/student/views/management.py
@@ -468,24 +468,6 @@ def disable_account_ajax(request):
     return JsonResponse(context)
 
 
-@login_required
-@ensure_csrf_cookie
-def change_setting(request):
-    """
-    JSON call to change a profile setting: Right now, location
-    """
-    # TODO (vshnayder): location is no longer used
-    u_prof = UserProfile.objects.get(user=request.user)  # request.user.profile_cache
-    if 'location' in request.POST:
-        u_prof.location = request.POST['location']
-    u_prof.save()
-
-    return JsonResponse({
-        "success": True,
-        "location": u_prof.location,
-    })
-
-
 @receiver(post_save, sender=User)
 def user_signup_handler(sender, **kwargs):  # pylint: disable=unused-argument
     """
-- 
GitLab