diff --git a/lms/djangoapps/courseware/views/index.py b/lms/djangoapps/courseware/views/index.py index 938c7d1dc8..4a0fcdd719 100644 --- a/lms/djangoapps/courseware/views/index.py +++ b/lms/djangoapps/courseware/views/index.py @@ -482,7 +482,7 @@ class CoursewareIndex(View): table_of_contents['previous_of_active_section'], table_of_contents['next_of_active_section'], ) - + courseware_context['unit'] = section_context.get('activate_block_id', '') courseware_context['fragment'] = self.section.render(self.view, section_context) if self.section.position and self.section.has_children: diff --git a/lms/templates/preview_menu.html b/lms/templates/preview_menu.html index 7b239d78d8..44e0d546a9 100644 --- a/lms/templates/preview_menu.html +++ b/lms/templates/preview_menu.html @@ -19,6 +19,16 @@ show_preview_menu = course and can_masquerade and supports_preview_menu def selected(is_selected): return "selected" if is_selected else "" + def get_mfe_link(): + if section: + mfe_link = '{}course/{}/{}'.format(settings.LEARNING_MICROFRONTEND_URL, course.id, section.location) + if unit: + mfe_link += '/' + unit + else: + mfe_link = None + return mfe_link + + mfe_link = get_mfe_link() course_partitions = get_all_partitions_for_course(course) masquerade_user_name = masquerade.user_name if masquerade else None masquerade_group_id = masquerade.group_id if masquerade else None @@ -66,6 +76,12 @@ show_preview_menu = course and can_masquerade and supports_preview_menu

% endif + % if user.is_staff and mfe_link: +
+

We're working on a new learning sequence experience

+ View this unit in the new experience +
+ % endif