Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-dashboard
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-analytics-dashboard
Commits
a2f476a3
Commit
a2f476a3
authored
Jul 01, 2016
by
Dennis Jen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disabling the learner lens still enables navigating to it.
parent
e8ff7547
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
analytics_dashboard/courses/tests/test_views/test_learners.py
+4
-0
analytics_dashboard/courses/views/__init__.py
+4
-2
No files found.
analytics_dashboard/courses/tests/test_views/test_learners.py
View file @
a2f476a3
...
...
@@ -79,6 +79,10 @@ class LearnersViewTests(ViewTestMixin, SwitchMixin, TestCase):
})
self
.
assertNotContains
(
response
,
self
.
TABLE_ERROR_TEXT
)
def
test_success_if_hidden
(
self
):
self
.
toggle_switch
(
'enable_learner_analytics'
,
False
)
self
.
test_success
()
@data
(
Timeout
,
ConnectionError
,
ValueError
)
def
test_data_api_error
(
self
,
RequestExceptionClass
):
learners_payload
=
{
'should_not'
:
'return this value'
}
...
...
analytics_dashboard/courses/views/__init__.py
View file @
a2f476a3
...
...
@@ -368,8 +368,10 @@ class CourseNavBarMixin(object):
# Get the active primary item and remove it from the list
primary_nav_item
=
None
if
self
.
active_primary_nav_item
:
primary_nav_item
=
[
i
for
i
in
primary_nav_items
if
i
[
'name'
]
==
self
.
active_primary_nav_item
][
0
]
primary_nav_items
.
remove
(
primary_nav_item
)
navs
=
[
i
for
i
in
primary_nav_items
if
i
[
'name'
]
==
self
.
active_primary_nav_item
]
if
navs
:
primary_nav_item
=
navs
[
0
]
primary_nav_items
.
remove
(
primary_nav_item
)
context
.
update
({
'primary_nav_item'
:
primary_nav_item
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment