diff --git a/lms/static/sass/course/layout/_courseware_preview.scss b/lms/static/sass/course/layout/_courseware_preview.scss index 9a75cb1612..2c2626a8b6 100644 --- a/lms/static/sass/course/layout/_courseware_preview.scss +++ b/lms/static/sass/course/layout/_courseware_preview.scss @@ -16,6 +16,10 @@ $proctoring-banner-text-size: 14px; @extend %inner-wrapper; width: auto; + + a.btn { + margin: 5px 0 5px 5px; + } } .preview-actions { diff --git a/lms/templates/preview_menu.html b/lms/templates/preview_menu.html index cd7da9f503..6afc80fc4e 100644 --- a/lms/templates/preview_menu.html +++ b/lms/templates/preview_menu.html @@ -26,10 +26,32 @@ show_preview_menu = course and can_masquerade and supports_preview_menu staff_selected = selected(not masquerade or masquerade.role != "student") specific_student_selected = selected(not staff_selected and masquerade.user_name) student_selected = selected(not staff_selected and not specific_student_selected and not masquerade_group_id) + + if settings.HTTPS == 'on': + protocol = 'https' + else: + protocol = 'http' + insights_base_url = settings.ANALYTICS_DASHBOARD_URL + studio_base_url = '' + if settings.CMS_BASE: + studio_base_url = protocol + '://' + settings.CMS_BASE + insights_url = insights_base_url + studio_url = studio_base_url + if course and course.id: + if insights_base_url: + insights_url = "{base_url}/{course_id}".format( + base_url=insights_base_url, + course_id=course.id, + ) + if studio_base_url: + studio_url = "{base_url}/course/{course_id}".format( + base_url=studio_base_url, + course_id=course.id, + ) %>