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
936bde0f
Commit
936bde0f
authored
Oct 27, 2014
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feature-gated enrollment demographics
The navbar item is now behind a switch.
parent
e9ef8a82
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
4 deletions
+19
-4
Makefile
+1
-0
README.md
+2
-0
analytics_dashboard/courses/tests/test_views/__init__.py
+8
-0
analytics_dashboard/courses/views.py
+8
-4
No files found.
Makefile
View file @
936bde0f
...
...
@@ -63,6 +63,7 @@ validate: validate_python validate_js
demo
:
cd
analytics_dashboard
&&
./manage.py switch show_engagement_forum_activity on
--create
cd
analytics_dashboard
&&
./manage.py switch show_navbar_demographics on
--create
compile_translations
:
cd
analytics_dashboard
&&
i18n_tool generate
...
...
README.md
View file @
936bde0f
...
...
@@ -53,6 +53,8 @@ The following switches are available:
| Switch | Purpose |
|-----------------------------------|----------------------------------------------------------|
| show_engagement_forum_activity | Show the forum activity on the course engagement page |
| show_navbar_demographics | Show the enrollment demographics navbar item |
Authentication & Authorization
------------------------------
...
...
analytics_dashboard/courses/tests/test_views/__init__.py
View file @
936bde0f
...
...
@@ -7,6 +7,7 @@ from django.conf import settings
from
django.utils.translation
import
ugettext_lazy
as
_
from
analyticsclient.exceptions
import
NotFoundError
from
waffle
import
Switch
from
analytics_dashboard.tests.test_views
import
RedirectTestCaseMixin
,
UserTestCaseMixin
from
courses.permissions
import
set_user_course_permissions
,
revoke_user_course_permissions
...
...
@@ -147,6 +148,13 @@ class CourseEnrollmentViewTestMixin(CourseViewTestMixin):
active_secondary_nav_label
=
None
api_method
=
'analyticsclient.course.Course.enrollment'
def
setUp
(
self
):
super
(
CourseEnrollmentViewTestMixin
,
self
)
.
setUp
()
switch
,
_created
=
Switch
.
objects
.
get_or_create
(
name
=
'show_navbar_demographics'
)
switch
.
active
=
True
switch
.
save
()
def
assertPrimaryNav
(
self
,
nav
,
course_id
):
expected
=
{
'icon'
:
'fa-child'
,
...
...
analytics_dashboard/courses/views.py
View file @
936bde0f
...
...
@@ -300,7 +300,8 @@ class EnrollmentTemplateView(CourseTemplateView):
"""
secondary_nav_items
=
[
{
'name'
:
'activity'
,
'label'
:
_
(
'Activity'
),
'view'
:
'courses:enrollment_activity'
},
{
'name'
:
'demographics'
,
'label'
:
_
(
'Demographics'
),
'view'
:
'courses:enrollment_demographics_age'
},
{
'name'
:
'demographics'
,
'label'
:
_
(
'Demographics'
),
'view'
:
'courses:enrollment_demographics_age'
,
'switch'
:
'show_navbar_demographics'
},
{
'name'
:
'geography'
,
'label'
:
_
(
'Geography'
),
'view'
:
'courses:enrollment_geography'
},
]
active_primary_nav_item
=
'enrollment'
...
...
@@ -412,7 +413,8 @@ class EnrollmentDemographicsAgeView(EnrollmentDemographicsTemplateView):
page_name
=
'enrollment_demographics_age'
active_tertiary_nav_item
=
'age'
# pylint: disable=line-too-long
chart_tooltip_template
=
_
(
'This age histogram presents data computed for the {percent}
%
of enrolled students who provided a year of birth.'
)
chart_tooltip_template
=
_
(
'This age histogram presents data computed for the {percent}
%
of enrolled students who provided a year of birth.'
)
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
EnrollmentDemographicsAgeView
,
self
)
.
get_context_data
(
**
kwargs
)
...
...
@@ -447,7 +449,8 @@ class EnrollmentDemographicsEducationView(EnrollmentDemographicsTemplateView):
page_name
=
'enrollment_demographics_education'
active_tertiary_nav_item
=
'education'
# pylint: disable=line-too-long
chart_tooltip_template
=
_
(
'This graph presents data for the {percent}
%
of enrolled students who provided a highest level of education completed.'
)
chart_tooltip_template
=
_
(
'This graph presents data for the {percent}
%
of enrolled students who provided a highest level of education completed.'
)
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
EnrollmentDemographicsEducationView
,
self
)
.
get_context_data
(
**
kwargs
)
...
...
@@ -482,7 +485,8 @@ class EnrollmentDemographicsGenderView(EnrollmentDemographicsTemplateView):
page_name
=
'enrollment_demographics_gender'
active_tertiary_nav_item
=
'gender'
# pylint: disable=line-too-long
chart_tooltip_template
=
_
(
'This graph presents data for the {percent}
%
of enrolled students who specified their gender.'
)
chart_tooltip_template
=
_
(
'This graph presents data for the {percent}
%
of enrolled students who specified their gender.'
)
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
EnrollmentDemographicsGenderView
,
self
)
.
get_context_data
(
**
kwargs
)
...
...
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