refactor: learner home cleanup (#31240)

* refactor: remove dev logging

* style: run black

* refactor: move masquerade check into utils

* style: remove unnecessary assignment

* style: update dependency orderings

* refactor: add function tracing for perf testing

* refactor: move grade data fetching out of serializer

This allows us to separately profile the collection of grade data

* fix: add missing requires_context metadata

* refactor: split out serialization for profiling
This commit is contained in:
Nathan Sprenkle
2022-11-02 14:55:03 -04:00
committed by GitHub
parent 1def767c9f
commit 178f1541d7
7 changed files with 266 additions and 176 deletions

View File

@@ -519,8 +519,7 @@ def student_dashboard(request): # lint-amnesty, pylint: disable=too-many-statem
if not UserProfile.objects.filter(user=user).exists():
return redirect(reverse('account_settings'))
enable_learner_home_mfe = should_redirect_to_learner_home_mfe()
if enable_learner_home_mfe:
if should_redirect_to_learner_home_mfe():
return redirect(settings.LEARNER_HOME_MICROFRONTEND_URL)
platform_name = configuration_helpers.get_value("platform_name", settings.PLATFORM_NAME)