Skip to content

Commit

Permalink
feat: remove deprecated endpoint (#2663)
Browse files Browse the repository at this point in the history
* feat: remove deprecated endpoint

this endpoint passed both internal and external deprecation


FIXES: APER-3791
  • Loading branch information
deborahgu authored Dec 9, 2024
1 parent 44cb945 commit 95f54ad
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 54 deletions.
28 changes: 0 additions & 28 deletions credentials/apps/records/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from credentials.apps.records.constants import UserCreditPathwayStatus
from credentials.apps.records.messages import ProgramCreditRequest
from credentials.apps.records.models import ProgramCertRecord, UserCreditPathway
from credentials.apps.records.utils import get_user_program_data
from credentials.shared.constants import PathwayType

from .constants import RECORDS_RATE_LIMIT
Expand Down Expand Up @@ -104,33 +103,6 @@ def get(self, request, *args, **kwargs):
return HttpResponseRedirect(settings.LEARNER_RECORD_MFE_RECORDS_PAGE_URL)


class ProgramListingView(RecordsListBaseView):
def _get_programs(self):
return get_user_program_data(
self.request.user.username,
self.request.site,
include_empty_programs=True,
include_retired_programs=False,
)

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)

context["title"] = _("Program Listing View")
context["program_help"] = _(
"The following is a list of all active programs for which program records are being generated."
)

return context

def dispatch(self, request, *args, **kwargs):
# Kick out non staff and non superuser users (skipping anonymous users,
# because they are redirected to a login screen instead)
if not request.user.is_anonymous and not request.user.is_staff and not request.user.is_superuser:
raise http.Http404()
return super().dispatch(request, *args, **kwargs)


class ProgramRecordView(ConditionallyRequireLoginMixin, RecordsEnabledMixin, TemplateView, ThemeViewMixin):
"""
The ProgramRecordView view continues to be required after converting our legacy frontend to the Learner Record MFE.
Expand Down
Binary file modified credentials/conf/locale/eo/LC_MESSAGES/django.mo
Binary file not shown.
12 changes: 0 additions & 12 deletions credentials/conf/locale/eo/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -633,18 +633,6 @@ msgstr ""
"Ûsér çrédït päthwäýs çän önlý ßé çönnéçtéd tö çrédït päthwäýs. Ⱡ'σяєм ιρѕυм "
"∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α#"

#: apps/records/views.py
msgid "Program Listing View"
msgstr "Prögräm Lïstïng Vïéw Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, #"

#: apps/records/views.py
msgid ""
"The following is a list of all active programs for which program records are"
" being generated."
msgstr ""
"Thé föllöwïng ïs ä lïst öf äll äçtïvé prögräms för whïçh prögräm réçörds äré"
" ßéïng générätéd. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σ#"

#: apps/verifiable_credentials/admin.py
msgid "Issuer ID"
msgstr "Ìssüér ÌD Ⱡ'σяєм ιρѕυм ∂σł#"
Expand Down
Binary file modified credentials/conf/locale/rtl/LC_MESSAGES/django.mo
Binary file not shown.
12 changes: 0 additions & 12 deletions credentials/conf/locale/rtl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -543,18 +543,6 @@ msgstr "øʇɥǝɹ"
msgid "User credit pathways can only be connected to credit pathways."
msgstr "Ʉsǝɹ ɔɹǝdᴉʇ dɐʇɥʍɐʎs ɔɐn ønlʎ bǝ ɔønnǝɔʇǝd ʇø ɔɹǝdᴉʇ dɐʇɥʍɐʎs."

#: apps/records/views.py
msgid "Program Listing View"
msgstr "Ᵽɹøƃɹɐɯ Łᴉsʇᴉnƃ Vᴉǝʍ"

#: apps/records/views.py
msgid ""
"The following is a list of all active programs for which program records are"
" being generated."
msgstr ""
"Ŧɥǝ ɟølløʍᴉnƃ ᴉs ɐ lᴉsʇ øɟ ɐll ɐɔʇᴉʌǝ dɹøƃɹɐɯs ɟøɹ ʍɥᴉɔɥ dɹøƃɹɐɯ ɹǝɔøɹds ɐɹǝ"
" bǝᴉnƃ ƃǝnǝɹɐʇǝd."

#: apps/verifiable_credentials/admin.py
msgid "Issuer ID"
msgstr "Ɨssnǝɹ ƗĐ"
Expand Down
2 changes: 0 additions & 2 deletions credentials/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
from credentials.apps.badges.toggles import is_badges_enabled
from credentials.apps.core import views as core_views
from credentials.apps.plugins.constants import PROJECT_TYPE
from credentials.apps.records.views import ProgramListingView
from credentials.apps.verifiable_credentials.toggles import is_verifiable_credentials_enabled
from credentials.views import FaviconView

Expand Down Expand Up @@ -63,7 +62,6 @@
path("health/", core_views.health, name="health"),
path("management/", include(("credentials.apps.edx_django_extensions.urls", "management"), namespace="management")),
path("records/", include(("credentials.apps.records.urls", "records"), namespace="records")),
re_path(r"^program-listing/", ProgramListingView.as_view(), name="program_listing"),
re_path(r"^favicon\.ico$", FaviconView.as_view(permanent=True)),
]

Expand Down

0 comments on commit 95f54ad

Please sign in to comment.