Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
0a514821
Commit
0a514821
authored
4 years ago
by
SaadYousaf
Browse files
Options
Downloads
Patches
Plain Diff
fix for instructor tab visible in learner role when masquerading.
parent
2f994a9b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/templates/courseware/course_navigation.html
+20
-13
20 additions, 13 deletions
lms/templates/courseware/course_navigation.html
with
20 additions
and
13 deletions
lms/templates/courseware/course_navigation.html
+
20
−
13
View file @
0a514821
...
...
@@ -4,6 +4,7 @@
<
%
namespace
name=
'static'
file=
'/static_content.html'
/>
<
%!
from
lms.djangoapps.courseware.masquerade
import
is_masquerading_as_student
from
lms.djangoapps.courseware.tabs
import
get_course_tab_list
from
django.conf
import
settings
from
django.urls
import
reverse
...
...
@@ -21,6 +22,8 @@ if course is not None:
settings.FEATURES.get
('
ENABLE_SPECIAL_EXAMS
',
False
)
and
(
course.enable_proctored_exams
or
course.enable_timed_exams
)
)
masquerading_as_student =
is_masquerading_as_student(request.user,
course.id
)
%
>
% if include_special_exams is not UNDEFINED and include_special_exams:
...
...
@@ -44,19 +47,23 @@ if course is not None:
<
%
tab_is_active =
tab.tab_id
in
(
active_page
,
default_tab
)
%
>
<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>
% if tab.name == 'Instructor' and masquerading_as_student:
<
%
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
% endfor
</ul>
</nav>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment