From 83b2f6e53573c41221091110a44fa7d8dcbcde4b Mon Sep 17 00:00:00 2001 From: stvn Date: Wed, 3 Jun 2020 15:04:15 -0700 Subject: [PATCH] Fix issue w/ staff toolbar's Insights link since the configuration value does _not_ include the `/courses` bit in either stage or prod. Note: The value for prod contains a trailing slash, while stage does not :shrug: I tested locally that this should work with either config (trailing slash or not). --- lms/templates/preview_menu.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lms/templates/preview_menu.html b/lms/templates/preview_menu.html index 6afc80fc4e..b9d5d223dd 100644 --- a/lms/templates/preview_menu.html +++ b/lms/templates/preview_menu.html @@ -31,7 +31,9 @@ show_preview_menu = course and can_masquerade and supports_preview_menu protocol = 'https' else: protocol = 'http' - insights_base_url = settings.ANALYTICS_DASHBOARD_URL + insights_base_url = '' + if settings.ANALYTICS_DASHBOARD_URL: + insights_base_url = settings.ANALYTICS_DASHBOARD_URL + '/courses' studio_base_url = '' if settings.CMS_BASE: studio_base_url = protocol + '://' + settings.CMS_BASE