* refactor: remove resume url checks for performance Existing "get resume urls" loads the course structure to verify the last completed block actually exists. This is a potentially very expensive operation, especially for users with many enrollments. This isn't a huge issue since Learning MFE already has a fallback behavior for this case. * refactor: remove now-unnecessary serializer check Old behavior passed an empty string for missing resume URL and serializer would cast to None. Instead, update simply passes through None for missing resume url * style: update dependency ordering * style: run black on some more files
21 lines
527 B
Python
21 lines
527 B
Python
"""Learner home URL routing configuration"""
|
|
|
|
from django.urls import re_path
|
|
|
|
from lms.djangoapps.learner_home import mock_views, views
|
|
|
|
app_name = "learner_home"
|
|
|
|
# Learner Dashboard Routing
|
|
urlpatterns = [
|
|
re_path(r"^init/?", views.InitializeView.as_view(), name="initialize"),
|
|
re_path(
|
|
r"^mock/init/?", mock_views.InitializeView.as_view(), name="mock_initialize"
|
|
),
|
|
re_path(
|
|
r"^recommendation/courses/$",
|
|
views.CourseRecommendationApiView.as_view(),
|
|
name="courses",
|
|
),
|
|
]
|