Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lms/djangoapps/courseware/views/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def _create_courseware_context(self, request):
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:
Expand Down
16 changes: 16 additions & 0 deletions lms/templates/preview_menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
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
Expand Down Expand Up @@ -66,6 +76,12 @@
</p>
</div>
% endif
% if user.is_staff and mfe_link:
<div style="text-align: right;float:right;padding-bottom:5px">
<p style="color: white; display: inline-block; margin-right: 10px;">We're working on a new learning sequence experience</p>
<a class="btn btn-primary" style="border: solid 1px white;" href="${mfe_link}">View this unit in the new experience</a>
</div>
% endif
</div>
</nav>

Expand Down