Revert "[TNL-7361] - Restrict Instructor Tab from masquerading user with student role."

This commit is contained in:
Saad Yousaf
2021-01-19 20:01:03 +05:00
committed by GitHub
parent 5458b30565
commit 93f4ceeee7

View File

@@ -44,23 +44,19 @@ if course is not None:
<%
tab_is_active = tab.tab_id in (active_page, default_tab)
%>
% if masquerade is not None and masquerade.role == 'student' and tab.name == 'Instructor':
<% continue %>
% else:
<li class="nav-item ${'active' if tab_is_active else ''}">
<a href="${tab.link_func(course, reverse)}" class="nav-link">
${_(tab.name)}
% if tab_is_active:
<span class="sr-only">, ${_('current location')}</span>
%endif
% if tab_image:
## Translators: 'needs attention' is an alternative string for the
## notification image that indicates the tab "needs attention".
<img src="${tab_image}" alt="${_('needs attention')}" />
%endif
</a>
</li>
%endif
<li class="nav-item ${'active' if tab_is_active else ''}">
<a href="${tab.link_func(course, reverse)}" class="nav-link">
${_(tab.name)}
% if tab_is_active:
<span class="sr-only">, ${_('current location')}</span>
%endif
% if tab_image:
## Translators: 'needs attention' is an alternative string for the
## notification image that indicates the tab "needs attention".
<img src="${tab_image}" alt="${_('needs attention')}" />
%endif
</a>
</li>
% endfor
</ul>
</nav>