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
6bfd5106
Commit
6bfd5106
authored
Nov 07, 2016
by
Tyler Hallada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Page name overhaul. Add BI events for nav links.
parent
5556aa4e
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
464 additions
and
70 deletions
+464
-70
analytics_dashboard/courses/templates/courses/_base_content_nav.html
+15
-3
analytics_dashboard/courses/templates/courses/_content_nav_menu.html
+15
-2
analytics_dashboard/courses/templates/courses/_graded_content_nav.html
+5
-0
analytics_dashboard/courses/templates/courses/_tags_content_nav.html
+4
-0
analytics_dashboard/courses/templates/courses/_ungraded_content_nav.html
+5
-0
analytics_dashboard/courses/templates/courses/_video_content_nav.html
+5
-0
analytics_dashboard/courses/templates/courses/enrollment_demographics_age.html
+1
-1
analytics_dashboard/courses/templates/courses/enrollment_demographics_education.html
+1
-1
analytics_dashboard/courses/templates/courses/enrollment_demographics_gender.html
+1
-1
analytics_dashboard/courses/templates/courses/home.html
+11
-2
analytics_dashboard/courses/views/__init__.py
+95
-18
analytics_dashboard/courses/views/engagement.py
+30
-5
analytics_dashboard/courses/views/enrollment.py
+84
-11
analytics_dashboard/courses/views/learners.py
+6
-1
analytics_dashboard/courses/views/performance.py
+84
-13
analytics_dashboard/static/apps/learners/app/controller.js
+21
-3
analytics_dashboard/static/js/views/tracking-view.js
+53
-3
analytics_dashboard/templates/brand.html
+3
-1
analytics_dashboard/templates/header.html
+6
-1
analytics_dashboard/templates/lens-navigation.html
+14
-3
analytics_dashboard/templates/submenu_navigation.html
+5
-1
No files found.
analytics_dashboard/courses/templates/courses/_base_content_nav.html
View file @
6bfd5106
...
@@ -21,7 +21,19 @@
...
@@ -21,7 +21,19 @@
{% captureas all_sections_text %}
{% captureas all_sections_text %}
{% block select_first_level_all %}{% endblock %}
{% block select_first_level_all %}{% endblock %}
{% endcaptureas %}
{% endcaptureas %}
{% include "courses/_content_nav_menu.html" with levels=first_levels labelledby="firstLevelMenu" home_content_url=sections_home_url home_content_text=all_sections_text%}
{% captureas third_level %}
{% block third_level_name %}component{% endblock %}
{% endcaptureas %}
{% captureas scope %}
{% block scope_name %}course{% endblock %}
{% endcaptureas %}
{% captureas lens %}
{% block lens_name %}{% endblock %}
{% endcaptureas %}
{% captureas report %}
{% block report_name %}{% endblock %}
{% endcaptureas %}
{% include "courses/_content_nav_menu.html" with levels=first_levels labelledby="firstLevelMenu" home_content_url=sections_home_url home_content_text=all_sections_text level_type="section" upper_level="" scope=scope lens=lens report=report %}
</div>
</div>
</li>
</li>
{% if second_levels %}
{% if second_levels %}
...
@@ -35,7 +47,7 @@
...
@@ -35,7 +47,7 @@
{% endif %}
{% endif %}
<span
class=
"caret"
></span>
<span
class=
"caret"
></span>
</span>
</span>
{% include "courses/_content_nav_menu.html" with levels=second_levels labelledby="secondLevelMenu"%}
{% include "courses/_content_nav_menu.html" with levels=second_levels labelledby="secondLevelMenu"
level_type="subsection" upper_level="section" scope=scope lens=lens report=report
%}
</div>
</div>
</li>
</li>
{% endif %}
{% endif %}
...
@@ -50,7 +62,7 @@
...
@@ -50,7 +62,7 @@
{% endif %}
{% endif %}
<span
class=
"caret"
></span>
<span
class=
"caret"
></span>
</span>
</span>
{% include "courses/_content_nav_menu.html" with levels=third_levels labelledby="thirdLevelMenu"%}
{% include "courses/_content_nav_menu.html" with levels=third_levels labelledby="thirdLevelMenu"
level_type=third_level_name upper_level="subsection" scope=scope lens=lens report=report
%}
</div>
</div>
</li>
</li>
{% endif %}
{% endif %}
...
...
analytics_dashboard/courses/templates/courses/_content_nav_menu.html
View file @
6bfd5106
...
@@ -3,13 +3,26 @@
...
@@ -3,13 +3,26 @@
<ul
class=
"dropdown-menu"
role=
"menu"
aria-labelledby=
"{{ labelledby }}"
>
<ul
class=
"dropdown-menu"
role=
"menu"
aria-labelledby=
"{{ labelledby }}"
>
{% if home_content_url and home_content_text %}
{% if home_content_url and home_content_text %}
<li
role=
"presentation"
>
<li
role=
"presentation"
>
<a
role=
"menuitem"
href=
"{{ home_content_url }}"
>
{{ home_content_text }}
</a>
<a
role=
"menuitem"
href=
"{{ home_content_url }}"
data-track-type=
"click"
data-track-event=
"edx.bi.ui.menu.navigated"
data-track-text=
{{
home_content_text
}}
data-track-url=
"{{ home_content_url }}"
data-track-target-scope=
{{
scope
}}
data-track-target-lens=
"{{ lens }}"
data-track-target-report=
"{{ report }}"
data-track-target-depth=
"{{ upper_level }}"
data-track-menu-depth=
"depth"
data-track-link-name=
"{% if upper_level == "
"
%}{{
report
}}{%
else
%}{{
upper_level
}}{%
endif
%}"
>
{{ home_content_text }}
</a>
</li>
</li>
{% endif %}
{% endif %}
{% for level in levels %}
{% for level in levels %}
<li
role=
"presentation"
{%
if
level
.
url =
=
None
%}
class=
"disabled"
{%
endif
%}
>
<li
role=
"presentation"
{%
if
level
.
url =
=
None
%}
class=
"disabled"
{%
endif
%}
>
<a
role=
"menuitem"
<a
role=
"menuitem"
{%
if
level
.
url
%}
href=
"{{ level.url }}{% endif %}"
>
{%
if
level
.
url
%}
href=
"{{ level.url }}"
data-track-type=
"click"
data-track-event=
"edx.bi.ui.menu.navigated"
data-track-text=
"{{ level.name }}"
data-track-url=
"{{ level.url }}"
data-track-target-scope=
"{{ scope }}"
data-track-target-lens=
"{{ lens }}"
data-track-target-report=
"{{ report }}"
data-track-target-depth=
"{{ level_type }}"
data-track-menu-depth=
"depth"
data-track-link-name=
"{{ level_type }}"
{%
endif
%}
>
{{ level.name }}
{{ level.name }}
</a>
</a>
</li>
</li>
...
...
analytics_dashboard/courses/templates/courses/_graded_content_nav.html
View file @
6bfd5106
...
@@ -7,6 +7,11 @@
...
@@ -7,6 +7,11 @@
{% url "courses:performance:graded_content" course_id=course_id %}
{% url "courses:performance:graded_content" course_id=course_id %}
{% endblock %}
{% endblock %}
{% block scope_name %}course{% endblock %}
{% block lens_name %}performance{% endblock %}
{% block report_name %}graded{% endblock %}
{% block third_level %}problem{% endblock %}
{% block select_first_level %}
{% block select_first_level %}
{% trans "Select Assignment Type" %}
{% trans "Select Assignment Type" %}
{% endblock %}
{% endblock %}
...
...
analytics_dashboard/courses/templates/courses/_tags_content_nav.html
View file @
6bfd5106
...
@@ -7,6 +7,10 @@
...
@@ -7,6 +7,10 @@
{% url "courses:performance:learning_outcomes" course_id=course_id %}
{% url "courses:performance:learning_outcomes" course_id=course_id %}
{% endblock %}
{% endblock %}
{% block scope_name %}course{% endblock %}
{% block lens_name %}performance{% endblock %}
{% block report_name %}outcomes{% endblock %}
{% block select_first_level %}
{% block select_first_level %}
{% trans "Select Outcome" %}
{% trans "Select Outcome" %}
{% endblock %}
{% endblock %}
...
...
analytics_dashboard/courses/templates/courses/_ungraded_content_nav.html
View file @
6bfd5106
...
@@ -7,6 +7,11 @@
...
@@ -7,6 +7,11 @@
{% url "courses:performance:ungraded_content" course_id=course_id %}
{% url "courses:performance:ungraded_content" course_id=course_id %}
{% endblock %}
{% endblock %}
{% block scope_name %}course{% endblock %}
{% block lens_name %}performance{% endblock %}
{% block report_name %}ungraded{% endblock %}
{% block third_level %}problem{% endblock %}
{% block select_first_level %}
{% block select_first_level %}
{% trans "Select Section" %}
{% trans "Select Section" %}
{% endblock %}
{% endblock %}
...
...
analytics_dashboard/courses/templates/courses/_video_content_nav.html
View file @
6bfd5106
...
@@ -7,6 +7,11 @@
...
@@ -7,6 +7,11 @@
{% url "courses:engagement:videos" course_id=course_id %}
{% url "courses:engagement:videos" course_id=course_id %}
{% endblock %}
{% endblock %}
{% block scope_name %}course{% endblock %}
{% block lens_name %}engagement{% endblock %}
{% block report_name %}videos{% endblock %}
{% block third_level %}timeline{% endblock %}
{% block select_first_level %}
{% block select_first_level %}
{% trans "Select Section" %}
{% trans "Select Section" %}
{% endblock %}
{% endblock %}
...
...
analytics_dashboard/courses/templates/courses/enrollment_demographics_age.html
View file @
6bfd5106
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<div
class=
"col col-12 sm-col-12"
>
<div
class=
"col col-12 sm-col-12"
>
<div
class=
"tertiary-nav"
>
<div
class=
"tertiary-nav"
>
<ul
class=
"nav navbar-nav"
>
<ul
class=
"nav navbar-nav"
>
{% include "submenu_navigation.html" with nav_items=tertiary_nav_items%}
{% include "submenu_navigation.html" with nav_items=tertiary_nav_items
%}
</ul>
</ul>
<div
class=
"section-heading"
>
<div
class=
"section-heading"
>
<span
class=
"section-heading-note small"
>
{% trans "How old are my students?" %}
</span>
<span
class=
"section-heading-note small"
>
{% trans "How old are my students?" %}
</span>
...
...
analytics_dashboard/courses/templates/courses/enrollment_demographics_education.html
View file @
6bfd5106
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<div
class=
"col col-12 sm-col-12"
>
<div
class=
"col col-12 sm-col-12"
>
<div
class=
"tertiary-nav"
>
<div
class=
"tertiary-nav"
>
<ul
class=
"nav navbar-nav"
>
<ul
class=
"nav navbar-nav"
>
{% include "submenu_navigation.html" with nav_items=tertiary_nav_items%}
{% include "submenu_navigation.html" with nav_items=tertiary_nav_items
%}
</ul>
</ul>
<div
class=
"section-heading"
>
<div
class=
"section-heading"
>
<span
class=
"section-heading-note small"
>
{% trans "What level of education do my students have?" %}
</span>
<span
class=
"section-heading-note small"
>
{% trans "What level of education do my students have?" %}
</span>
...
...
analytics_dashboard/courses/templates/courses/enrollment_demographics_gender.html
View file @
6bfd5106
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<div
class=
"col col-12 sm-col-12"
>
<div
class=
"col col-12 sm-col-12"
>
<div
class=
"tertiary-nav"
>
<div
class=
"tertiary-nav"
>
<ul
class=
"nav navbar-nav"
>
<ul
class=
"nav navbar-nav"
>
{% include "submenu_navigation.html" with nav_items=tertiary_nav_items%}
{% include "submenu_navigation.html" with nav_items=tertiary_nav_items
%}
</ul>
</ul>
<div
class=
"section-heading"
>
<div
class=
"section-heading"
>
<span
class=
"section-heading-note small"
>
{% trans "What is the student gender breakdown?" %}
</span>
<span
class=
"section-heading-note small"
>
{% trans "What is the student gender breakdown?" %}
</span>
...
...
analytics_dashboard/courses/templates/courses/home.html
View file @
6bfd5106
...
@@ -17,7 +17,12 @@
...
@@ -17,7 +17,12 @@
{% for item in primary_nav_items %}
{% for item in primary_nav_items %}
<li>
<li>
<a
href=
"{{ item.href }}{{ item.fragment }}"
><span
class=
"link-label"
>
<a
href=
"{{ item.href }}{{ item.fragment }}"
data-track-type=
"click"
data-track-event=
"edx.bi.ui.menu.navigated"
data-track-text=
"{{ item.label }}"
data-track-url=
"{{ item.href }}{{ item.fragment }}"
data-track-target-scope=
"{{ item.scope }}"
data-track-target-lens=
"{{ item.lens }}"
data-track-target-report=
"{{ item.report }}"
data-track-target-depth=
"{{ item.depth }}"
data-track-menu-depth=
"lens"
data-track-link-name=
"{{ item.lens }}"
><span
class=
"link-label"
>
{% if item.icon %}
<span
class=
"ico fa {{ item.icon }}"
aria-hidden=
"true"
></span>
{% endif %}
{% if item.icon %}
<span
class=
"ico fa {{ item.icon }}"
aria-hidden=
"true"
></span>
{% endif %}
{{ item.label }}
{{ item.label }}
</span></a>
</span></a>
...
@@ -46,7 +51,11 @@
...
@@ -46,7 +51,11 @@
<div
class=
"title"
><a
href=
"{% url item.view course_id=course_id %}{{ item.fragment }}"
<div
class=
"title"
><a
href=
"{% url item.view course_id=course_id %}{{ item.fragment }}"
data-track-type=
"click"
data-track-event=
"edx.bi.course.question_clicked"
data-track-type=
"click"
data-track-event=
"edx.bi.course.question_clicked"
data-track-category=
"{{ column.name|lower }}"
data-track-question=
"{{ item.title }}"
data-track-category=
"{{ column.name|lower }}"
data-track-question=
"{{ item.title }}"
data-track-url=
"{% url item.view course_id=course_id %}{{ item.fragment }}"
>
{{ item.title }}
</a></div>
data-track-url=
"{% url item.view course_id=course_id %}{{ item.fragment }}"
data-track-target-scope=
"{{ item.scope }}"
data-track-target-lens=
"{{ item.lens }}"
data-track-target-report=
"{{ item.report }}"
data-track-target-depth=
"{{ item.depth }}"
>
{{ item.title }}
</a></div>
<div
class=
"breadcrumbs"
>
<div
class=
"breadcrumbs"
>
<span
class=
"ico fa {{ column.icon }}"
aria-hidden=
"true"
></span>
<span
class=
"ico fa {{ column.icon }}"
aria-hidden=
"true"
></span>
<span
class=
"ico fa fa-caret-right"
aria-hidden=
"true"
></span>
<span
class=
"ico fa fa-caret-right"
aria-hidden=
"true"
></span>
...
...
analytics_dashboard/courses/views/__init__.py
View file @
6bfd5106
...
@@ -131,10 +131,17 @@ class TrackedViewMixin(object):
...
@@ -131,10 +131,17 @@ class TrackedViewMixin(object):
"""
"""
# Page name used for usage tracking/analytics
# Page name used for usage tracking/analytics
page_name
=
None
page_name
=
{
'scope'
:
''
,
'lens'
:
''
,
'report'
:
''
,
'depth'
:
''
,
}
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
TrackedViewMixin
,
self
)
.
get_context_data
(
**
kwargs
)
context
=
super
(
TrackedViewMixin
,
self
)
.
get_context_data
(
**
kwargs
)
self
.
page_name
[
'name'
]
=
'_'
.
join
([
self
.
page_name
[
lvl
]
for
lvl
in
[
'scope'
,
'lens'
,
'report'
,
'depth'
]
if
self
.
page_name
[
lvl
]])
context
[
'js_data'
]
=
context
.
get
(
'js_data'
,
{})
context
[
'js_data'
]
=
context
.
get
(
'js_data'
,
{})
context
[
'js_data'
]
.
update
({
context
[
'js_data'
]
.
update
({
'tracking'
:
{
'tracking'
:
{
...
@@ -287,14 +294,22 @@ class CourseNavBarMixin(object):
...
@@ -287,14 +294,22 @@ class CourseNavBarMixin(object):
'label'
:
_
(
'Enrollment'
),
'label'
:
_
(
'Enrollment'
),
'view'
:
'courses:enrollment:activity'
,
'view'
:
'courses:enrollment:activity'
,
'icon'
:
'fa-child'
,
'icon'
:
'fa-child'
,
'fragment'
:
''
'fragment'
:
''
,
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'activity'
,
'depth'
:
''
},
},
{
{
'name'
:
'engagement'
,
'name'
:
'engagement'
,
'label'
:
_
(
'Engagement'
),
'label'
:
_
(
'Engagement'
),
'view'
:
'courses:engagement:content'
,
'view'
:
'courses:engagement:content'
,
'icon'
:
'fa-bar-chart'
,
'icon'
:
'fa-bar-chart'
,
'fragment'
:
''
'fragment'
:
''
,
'scope'
:
'course'
,
'lens'
:
'engagement'
,
'report'
:
'content'
,
'depth'
:
''
},
},
{
{
'name'
:
'performance'
,
'name'
:
'performance'
,
...
@@ -302,7 +317,11 @@ class CourseNavBarMixin(object):
...
@@ -302,7 +317,11 @@ class CourseNavBarMixin(object):
'view'
:
'courses:performance:graded_content'
,
'view'
:
'courses:performance:graded_content'
,
'icon'
:
'fa-check-square-o'
,
'icon'
:
'fa-check-square-o'
,
'switch'
:
'enable_course_api'
,
'switch'
:
'enable_course_api'
,
'fragment'
:
''
'fragment'
:
''
,
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'graded'
,
'depth'
:
''
},
},
{
{
'name'
:
'learners'
,
'name'
:
'learners'
,
...
@@ -310,7 +329,11 @@ class CourseNavBarMixin(object):
...
@@ -310,7 +329,11 @@ class CourseNavBarMixin(object):
'view'
:
'courses:learners:learners'
,
'view'
:
'courses:learners:learners'
,
'icon'
:
'fa-users'
,
'icon'
:
'fa-users'
,
'flag'
:
'display_learner_analytics'
,
'flag'
:
'display_learner_analytics'
,
'fragment'
:
'#?ignore_segments=inactive'
'fragment'
:
'#?ignore_segments=inactive'
,
'scope'
:
'course'
,
'lens'
:
'learners'
,
'report'
:
'roster'
,
'depth'
:
''
}
}
]
]
...
@@ -451,7 +474,12 @@ class CourseTemplateWithNavView(CourseNavBarMixin, CourseTemplateView):
...
@@ -451,7 +474,12 @@ class CourseTemplateWithNavView(CourseNavBarMixin, CourseTemplateView):
class
CourseHome
(
CourseTemplateWithNavView
):
class
CourseHome
(
CourseTemplateWithNavView
):
template_name
=
'courses/home.html'
template_name
=
'courses/home.html'
page_name
=
'course_home'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'home'
,
'report'
:
''
,
'depth'
:
''
}
page_title
=
_
(
'Course Home'
)
page_title
=
_
(
'Course Home'
)
def
get_table_items
(
self
,
request
):
def
get_table_items
(
self
,
request
):
...
@@ -466,31 +494,51 @@ class CourseHome(CourseTemplateWithNavView):
...
@@ -466,31 +494,51 @@ class CourseHome(CourseTemplateWithNavView):
'title'
:
_
(
'How many students are in my course?'
),
'title'
:
_
(
'How many students are in my course?'
),
'view'
:
'courses:enrollment:activity'
,
'view'
:
'courses:enrollment:activity'
,
'breadcrumbs'
:
[
_
(
'Activity'
)],
'breadcrumbs'
:
[
_
(
'Activity'
)],
'fragment'
:
''
'fragment'
:
''
,
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'activity'
,
'depth'
:
''
},
},
{
{
'title'
:
_
(
'How old are my students?'
),
'title'
:
_
(
'How old are my students?'
),
'view'
:
'courses:enrollment:demographics_age'
,
'view'
:
'courses:enrollment:demographics_age'
,
'breadcrumbs'
:
[
_
(
'Demographics'
),
_
(
'Age'
)],
'breadcrumbs'
:
[
_
(
'Demographics'
),
_
(
'Age'
)],
'fragment'
:
''
'fragment'
:
''
,
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'demographics'
,
'depth'
:
'age'
},
},
{
{
'title'
:
_
(
'What level of education do my students have?'
),
'title'
:
_
(
'What level of education do my students have?'
),
'view'
:
'courses:enrollment:demographics_education'
,
'view'
:
'courses:enrollment:demographics_education'
,
'breadcrumbs'
:
[
_
(
'Demographics'
),
_
(
'Education'
)],
'breadcrumbs'
:
[
_
(
'Demographics'
),
_
(
'Education'
)],
'fragment'
:
''
'fragment'
:
''
,
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'demographics'
,
'depth'
:
'education'
},
},
{
{
'title'
:
_
(
'What is the student gender breakdown?'
),
'title'
:
_
(
'What is the student gender breakdown?'
),
'view'
:
'courses:enrollment:demographics_gender'
,
'view'
:
'courses:enrollment:demographics_gender'
,
'breadcrumbs'
:
[
_
(
'Demographics'
),
_
(
'Gender'
)],
'breadcrumbs'
:
[
_
(
'Demographics'
),
_
(
'Gender'
)],
'fragment'
:
''
'fragment'
:
''
,
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'demographics'
,
'depth'
:
'gender'
},
},
{
{
'title'
:
_
(
'Where are my students?'
),
'title'
:
_
(
'Where are my students?'
),
'view'
:
'courses:enrollment:geography'
,
'view'
:
'courses:enrollment:geography'
,
'breadcrumbs'
:
[
_
(
'Geography'
)],
'breadcrumbs'
:
[
_
(
'Geography'
)],
'fragment'
:
''
'fragment'
:
''
,
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'geography'
,
'depth'
:
''
},
},
],
],
}
}
...
@@ -505,7 +553,11 @@ class CourseHome(CourseTemplateWithNavView):
...
@@ -505,7 +553,11 @@ class CourseHome(CourseTemplateWithNavView):
'title'
:
_
(
'How many students are interacting with my course?'
),
'title'
:
_
(
'How many students are interacting with my course?'
),
'view'
:
'courses:engagement:content'
,
'view'
:
'courses:engagement:content'
,
'breadcrumbs'
:
[
_
(
'Content'
)],
'breadcrumbs'
:
[
_
(
'Content'
)],
'fragment'
:
''
'fragment'
:
''
,
'scope'
:
'course'
,
'lens'
:
'engagement'
,
'report'
:
'content'
,
'depth'
:
''
}
}
]
]
}
}
...
@@ -514,7 +566,11 @@ class CourseHome(CourseTemplateWithNavView):
...
@@ -514,7 +566,11 @@ class CourseHome(CourseTemplateWithNavView):
'title'
:
_
(
'How did students interact with course videos?'
),
'title'
:
_
(
'How did students interact with course videos?'
),
'view'
:
'courses:engagement:videos'
,
'view'
:
'courses:engagement:videos'
,
'breadcrumbs'
:
[
_
(
'Videos'
)],
'breadcrumbs'
:
[
_
(
'Videos'
)],
'fragment'
:
''
'fragment'
:
''
,
'scope'
:
'course'
,
'lens'
:
'engagement'
,
'report'
:
'videos'
,
'depth'
:
''
})
})
items
.
append
(
engagement_items
)
items
.
append
(
engagement_items
)
...
@@ -524,12 +580,20 @@ class CourseHome(CourseTemplateWithNavView):
...
@@ -524,12 +580,20 @@ class CourseHome(CourseTemplateWithNavView):
'title'
:
_
(
'How are students doing on graded course assignments?'
),
'title'
:
_
(
'How are students doing on graded course assignments?'
),
'view'
:
'courses:performance:graded_content'
,
'view'
:
'courses:performance:graded_content'
,
'breadcrumbs'
:
[
_
(
'Graded Content'
)],
'breadcrumbs'
:
[
_
(
'Graded Content'
)],
'fragment'
:
''
'fragment'
:
''
,
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'graded'
,
'depth'
:
''
},
{
},
{
'title'
:
_
(
'How are students doing on ungraded exercises?'
),
'title'
:
_
(
'How are students doing on ungraded exercises?'
),
'view'
:
'courses:performance:ungraded_content'
,
'view'
:
'courses:performance:ungraded_content'
,
'breadcrumbs'
:
[
_
(
'Ungraded Problems'
)],
'breadcrumbs'
:
[
_
(
'Ungraded Problems'
)],
'fragment'
:
''
'fragment'
:
''
,
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'ungraded'
,
'depth'
:
''
}]
}]
if
switch_is_active
(
'enable_performance_learning_outcome'
):
if
switch_is_active
(
'enable_performance_learning_outcome'
):
...
@@ -537,7 +601,11 @@ class CourseHome(CourseTemplateWithNavView):
...
@@ -537,7 +601,11 @@ class CourseHome(CourseTemplateWithNavView):
'title'
:
_
(
'What is the breakdown for course learning outcomes?'
),
'title'
:
_
(
'What is the breakdown for course learning outcomes?'
),
'view'
:
'courses:performance:learning_outcomes'
,
'view'
:
'courses:performance:learning_outcomes'
,
'breadcrumbs'
:
[
_
(
'Learning Outcomes'
)],
'breadcrumbs'
:
[
_
(
'Learning Outcomes'
)],
'fragment'
:
''
'fragment'
:
''
,
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'outcomes'
,
'depth'
:
''
})
})
if
switch_is_active
(
'enable_problem_response_download'
):
if
switch_is_active
(
'enable_problem_response_download'
):
...
@@ -573,7 +641,11 @@ class CourseHome(CourseTemplateWithNavView):
...
@@ -573,7 +641,11 @@ class CourseHome(CourseTemplateWithNavView):
'title'
:
_
(
"Who is engaged? Who isn't?"
),
'title'
:
_
(
"Who is engaged? Who isn't?"
),
'view'
:
'courses:learners:learners'
,
'view'
:
'courses:learners:learners'
,
'breadcrumbs'
:
[
_
(
'All Learners'
)],
'breadcrumbs'
:
[
_
(
'All Learners'
)],
'fragment'
:
'#?ignore_segments=inactive'
'fragment'
:
'#?ignore_segments=inactive'
,
'scope'
:
'course'
,
'lens'
:
'learners'
,
'report'
:
'roster'
,
'depth'
:
''
},
},
# TODO: this is commented out until we complete the deep linking work, AN-6671
# TODO: this is commented out until we complete the deep linking work, AN-6671
# {
# {
...
@@ -669,7 +741,12 @@ class CourseHome(CourseTemplateWithNavView):
...
@@ -669,7 +741,12 @@ class CourseHome(CourseTemplateWithNavView):
class
CourseIndex
(
CourseAPIMixin
,
LoginRequiredMixin
,
TrackedViewMixin
,
LazyEncoderMixin
,
TemplateView
):
class
CourseIndex
(
CourseAPIMixin
,
LoginRequiredMixin
,
TrackedViewMixin
,
LazyEncoderMixin
,
TemplateView
):
template_name
=
'courses/index.html'
template_name
=
'courses/index.html'
page_name
=
'course_index'
page_name
=
{
'scope'
:
'insights'
,
'lens'
:
'home'
,
'report'
:
''
,
'depth'
:
''
}
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
CourseIndex
,
self
)
.
get_context_data
(
**
kwargs
)
context
=
super
(
CourseIndex
,
self
)
.
get_context_data
(
**
kwargs
)
...
...
analytics_dashboard/courses/views/engagement.py
View file @
6bfd5106
...
@@ -32,7 +32,12 @@ class EngagementTemplateView(CourseTemplateWithNavView):
...
@@ -32,7 +32,12 @@ class EngagementTemplateView(CourseTemplateWithNavView):
class
EngagementContentView
(
EngagementTemplateView
):
class
EngagementContentView
(
EngagementTemplateView
):
template_name
=
'courses/engagement_content.html'
template_name
=
'courses/engagement_content.html'
page_title
=
_
(
'Engagement Content'
)
page_title
=
_
(
'Engagement Content'
)
page_name
=
'engagement_content'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'engagement'
,
'report'
:
'content'
,
'depth'
:
''
}
active_secondary_nav_item
=
'content'
active_secondary_nav_item
=
'content'
# Translators: Do not translate UTC.
# Translators: Do not translate UTC.
...
@@ -84,7 +89,12 @@ class EngagementVideoContentTemplateView(CourseStructureMixin, CourseStructureEx
...
@@ -84,7 +89,12 @@ class EngagementVideoContentTemplateView(CourseStructureMixin, CourseStructureEx
class
EngagementVideoCourse
(
EngagementVideoContentTemplateView
):
class
EngagementVideoCourse
(
EngagementVideoContentTemplateView
):
template_name
=
'courses/engagement_video_course.html'
template_name
=
'courses/engagement_video_course.html'
page_name
=
'engagement_videos'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'engagement'
,
'report'
:
'videos'
,
'depth'
:
''
}
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
EngagementVideoCourse
,
self
)
.
get_context_data
(
**
kwargs
)
context
=
super
(
EngagementVideoCourse
,
self
)
.
get_context_data
(
**
kwargs
)
...
@@ -98,7 +108,12 @@ class EngagementVideoCourse(EngagementVideoContentTemplateView):
...
@@ -98,7 +108,12 @@ class EngagementVideoCourse(EngagementVideoContentTemplateView):
class
EngagementVideoSection
(
EngagementVideoContentTemplateView
):
class
EngagementVideoSection
(
EngagementVideoContentTemplateView
):
template_name
=
'courses/engagement_video_by_section.html'
template_name
=
'courses/engagement_video_by_section.html'
page_name
=
'engagement_videos'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'engagement'
,
'report'
:
'videos'
,
'depth'
:
'section'
}
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
EngagementVideoSection
,
self
)
.
get_context_data
(
**
kwargs
)
context
=
super
(
EngagementVideoSection
,
self
)
.
get_context_data
(
**
kwargs
)
...
@@ -113,7 +128,12 @@ class EngagementVideoSection(EngagementVideoContentTemplateView):
...
@@ -113,7 +128,12 @@ class EngagementVideoSection(EngagementVideoContentTemplateView):
class
EngagementVideoSubsection
(
EngagementVideoContentTemplateView
):
class
EngagementVideoSubsection
(
EngagementVideoContentTemplateView
):
template_name
=
'courses/engagement_video_by_subsection.html'
template_name
=
'courses/engagement_video_by_subsection.html'
page_name
=
'engagement_videos'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'engagement'
,
'report'
:
'videos'
,
'depth'
:
'subsection'
}
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
EngagementVideoSubsection
,
self
)
.
get_context_data
(
**
kwargs
)
context
=
super
(
EngagementVideoSubsection
,
self
)
.
get_context_data
(
**
kwargs
)
...
@@ -130,7 +150,12 @@ class EngagementVideoSubsection(EngagementVideoContentTemplateView):
...
@@ -130,7 +150,12 @@ class EngagementVideoSubsection(EngagementVideoContentTemplateView):
class
EngagementVideoTimeline
(
EngagementVideoContentTemplateView
):
class
EngagementVideoTimeline
(
EngagementVideoContentTemplateView
):
template_name
=
'courses/engagement_video_timeline.html'
template_name
=
'courses/engagement_video_timeline.html'
page_name
=
'engagement_videos'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'engagement'
,
'report'
:
'videos'
,
'depth'
:
'timeline'
}
video_id
=
None
video_id
=
None
def
dispatch
(
self
,
request
,
*
args
,
**
kwargs
):
def
dispatch
(
self
,
request
,
*
args
,
**
kwargs
):
...
...
analytics_dashboard/courses/views/enrollment.py
View file @
6bfd5106
...
@@ -17,9 +17,33 @@ class EnrollmentTemplateView(CourseTemplateWithNavView):
...
@@ -17,9 +17,33 @@ class EnrollmentTemplateView(CourseTemplateWithNavView):
Base view for course enrollment pages.
Base view for course enrollment pages.
"""
"""
secondary_nav_items
=
[
secondary_nav_items
=
[
{
'name'
:
'activity'
,
'label'
:
_
(
'Activity'
),
'view'
:
'courses:enrollment:activity'
},
{
{
'name'
:
'demographics'
,
'label'
:
_
(
'Demographics'
),
'view'
:
'courses:enrollment:demographics_age'
},
'name'
:
'activity'
,
{
'name'
:
'geography'
,
'label'
:
_
(
'Geography'
),
'view'
:
'courses:enrollment:geography'
},
'label'
:
_
(
'Activity'
),
'view'
:
'courses:enrollment:activity'
,
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'activity'
,
'depth'
:
''
},
{
'name'
:
'demographics'
,
'label'
:
_
(
'Demographics'
),
'view'
:
'courses:enrollment:demographics_age'
,
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'demographics'
,
'depth'
:
'age'
},
{
'name'
:
'geography'
,
'label'
:
_
(
'Geography'
),
'view'
:
'courses:enrollment:geography'
,
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'geography'
,
'depth'
:
''
},
]
]
active_primary_nav_item
=
'enrollment'
active_primary_nav_item
=
'enrollment'
...
@@ -30,9 +54,33 @@ class EnrollmentDemographicsTemplateView(EnrollmentTemplateView):
...
@@ -30,9 +54,33 @@ class EnrollmentDemographicsTemplateView(EnrollmentTemplateView):
"""
"""
active_secondary_nav_item
=
'demographics'
active_secondary_nav_item
=
'demographics'
tertiary_nav_items
=
[
tertiary_nav_items
=
[
{
'name'
:
'age'
,
'label'
:
_
(
'Age'
),
'view'
:
'courses:enrollment:demographics_age'
},
{
{
'name'
:
'education'
,
'label'
:
_
(
'Education'
),
'view'
:
'courses:enrollment:demographics_education'
},
'name'
:
'age'
,
{
'name'
:
'gender'
,
'label'
:
_
(
'Gender'
),
'view'
:
'courses:enrollment:demographics_gender'
}
'label'
:
_
(
'Age'
),
'view'
:
'courses:enrollment:demographics_age'
,
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'demographics'
,
'depth'
:
'age'
},
{
'name'
:
'education'
,
'label'
:
_
(
'Education'
),
'view'
:
'courses:enrollment:demographics_education'
,
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'demographics'
,
'depth'
:
'education'
},
{
'name'
:
'gender'
,
'label'
:
_
(
'Gender'
),
'view'
:
'courses:enrollment:demographics_gender'
,
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'demographics'
,
'depth'
:
'gender'
}
]
]
# Translators: Do not translate UTC.
# Translators: Do not translate UTC.
...
@@ -54,7 +102,12 @@ class EnrollmentDemographicsTemplateView(EnrollmentTemplateView):
...
@@ -54,7 +102,12 @@ class EnrollmentDemographicsTemplateView(EnrollmentTemplateView):
class
EnrollmentActivityView
(
EnrollmentTemplateView
):
class
EnrollmentActivityView
(
EnrollmentTemplateView
):
template_name
=
'courses/enrollment_activity.html'
template_name
=
'courses/enrollment_activity.html'
page_title
=
_
(
'Enrollment Activity'
)
page_title
=
_
(
'Enrollment Activity'
)
page_name
=
'enrollment_activity'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'activity'
,
'depth'
:
''
}
active_secondary_nav_item
=
'activity'
active_secondary_nav_item
=
'activity'
# Translators: Do not translate UTC.
# Translators: Do not translate UTC.
...
@@ -90,7 +143,12 @@ class EnrollmentActivityView(EnrollmentTemplateView):
...
@@ -90,7 +143,12 @@ class EnrollmentActivityView(EnrollmentTemplateView):
class
EnrollmentDemographicsAgeView
(
EnrollmentDemographicsTemplateView
):
class
EnrollmentDemographicsAgeView
(
EnrollmentDemographicsTemplateView
):
template_name
=
'courses/enrollment_demographics_age.html'
template_name
=
'courses/enrollment_demographics_age.html'
page_title
=
_
(
'Enrollment Demographics by Age'
)
page_title
=
_
(
'Enrollment Demographics by Age'
)
page_name
=
'enrollment_demographics_age'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'demographics'
,
'depth'
:
'age'
}
active_tertiary_nav_item
=
'age'
active_tertiary_nav_item
=
'age'
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
...
@@ -123,7 +181,12 @@ class EnrollmentDemographicsAgeView(EnrollmentDemographicsTemplateView):
...
@@ -123,7 +181,12 @@ class EnrollmentDemographicsAgeView(EnrollmentDemographicsTemplateView):
class
EnrollmentDemographicsEducationView
(
EnrollmentDemographicsTemplateView
):
class
EnrollmentDemographicsEducationView
(
EnrollmentDemographicsTemplateView
):
template_name
=
'courses/enrollment_demographics_education.html'
template_name
=
'courses/enrollment_demographics_education.html'
page_title
=
_
(
'Enrollment Demographics by Education'
)
page_title
=
_
(
'Enrollment Demographics by Education'
)
page_name
=
'enrollment_demographics_education'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'demographics'
,
'depth'
:
'education'
}
active_tertiary_nav_item
=
'education'
active_tertiary_nav_item
=
'education'
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
...
@@ -156,7 +219,12 @@ class EnrollmentDemographicsEducationView(EnrollmentDemographicsTemplateView):
...
@@ -156,7 +219,12 @@ class EnrollmentDemographicsEducationView(EnrollmentDemographicsTemplateView):
class
EnrollmentDemographicsGenderView
(
EnrollmentDemographicsTemplateView
):
class
EnrollmentDemographicsGenderView
(
EnrollmentDemographicsTemplateView
):
template_name
=
'courses/enrollment_demographics_gender.html'
template_name
=
'courses/enrollment_demographics_gender.html'
page_title
=
_
(
'Enrollment Demographics by Gender'
)
page_title
=
_
(
'Enrollment Demographics by Gender'
)
page_name
=
'enrollment_demographics_gender'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'demographics'
,
'depth'
:
'gender'
}
active_tertiary_nav_item
=
'gender'
active_tertiary_nav_item
=
'gender'
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
...
@@ -189,7 +257,12 @@ class EnrollmentDemographicsGenderView(EnrollmentDemographicsTemplateView):
...
@@ -189,7 +257,12 @@ class EnrollmentDemographicsGenderView(EnrollmentDemographicsTemplateView):
class
EnrollmentGeographyView
(
EnrollmentTemplateView
):
class
EnrollmentGeographyView
(
EnrollmentTemplateView
):
template_name
=
'courses/enrollment_geography.html'
template_name
=
'courses/enrollment_geography.html'
page_title
=
_
(
'Enrollment Geography'
)
page_title
=
_
(
'Enrollment Geography'
)
page_name
=
'enrollment_geography'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'enrollment'
,
'report'
:
'geography'
,
'depth'
:
''
}
active_secondary_nav_item
=
'geography'
active_secondary_nav_item
=
'geography'
# Translators: Do not translate UTC.
# Translators: Do not translate UTC.
...
...
analytics_dashboard/courses/views/learners.py
View file @
6bfd5106
...
@@ -18,7 +18,12 @@ class LearnersView(CourseTemplateWithNavView):
...
@@ -18,7 +18,12 @@ class LearnersView(CourseTemplateWithNavView):
template_name
=
'courses/learners.html'
template_name
=
'courses/learners.html'
active_primary_nav_item
=
'learners'
active_primary_nav_item
=
'learners'
page_title
=
_
(
'Learners'
)
page_title
=
_
(
'Learners'
)
page_name
=
'learners'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'learners'
,
'report'
:
'roster'
,
'depth'
:
''
}
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
LearnersView
,
self
)
.
get_context_data
(
**
kwargs
)
context
=
super
(
LearnersView
,
self
)
.
get_context_data
(
**
kwargs
)
...
...
analytics_dashboard/courses/views/performance.py
View file @
6bfd5106
...
@@ -32,8 +32,24 @@ class PerformanceTemplateView(CourseStructureExceptionMixin, CourseTemplateWithN
...
@@ -32,8 +32,24 @@ class PerformanceTemplateView(CourseStructureExceptionMixin, CourseTemplateWithN
update_message
=
_
(
'Problem submission data was last updated
%(update_date)
s at
%(update_time)
s UTC.'
)
update_message
=
_
(
'Problem submission data was last updated
%(update_date)
s at
%(update_time)
s UTC.'
)
secondary_nav_items_base
=
[
secondary_nav_items_base
=
[
{
'name'
:
'graded_content'
,
'label'
:
_
(
'Graded Content'
),
'view'
:
'courses:performance:graded_content'
},
{
{
'name'
:
'ungraded_content'
,
'label'
:
_
(
'Ungraded Problems'
),
'view'
:
'courses:performance:ungraded_content'
},
'name'
:
'graded_content'
,
'label'
:
_
(
'Graded Content'
),
'view'
:
'courses:performance:graded_content'
,
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'graded'
,
'depth'
:
''
},
{
'name'
:
'ungraded_content'
,
'label'
:
_
(
'Ungraded Problems'
),
'view'
:
'courses:performance:ungraded_content'
,
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'ungraded'
,
'depth'
:
''
},
]
]
secondary_nav_items
=
None
secondary_nav_items
=
None
...
@@ -171,12 +187,22 @@ class PerformanceAnswerDistributionView(PerformanceAnswerDistributionMixin,
...
@@ -171,12 +187,22 @@ class PerformanceAnswerDistributionView(PerformanceAnswerDistributionMixin,
PerformanceGradedContentTemplateView
):
PerformanceGradedContentTemplateView
):
template_name
=
'courses/performance_answer_distribution.html'
template_name
=
'courses/performance_answer_distribution.html'
page_title
=
_
(
'Performance: Problem Submissions'
)
page_title
=
_
(
'Performance: Problem Submissions'
)
page_name
=
'performance_answer_distribution'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'graded'
,
'depth'
:
'problem'
}
class
PerformanceGradedContent
(
PerformanceGradedContentTemplateView
):
class
PerformanceGradedContent
(
PerformanceGradedContentTemplateView
):
template_name
=
'courses/performance_graded_content.html'
template_name
=
'courses/performance_graded_content.html'
page_name
=
'performance_graded_content'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'graded'
,
'depth'
:
''
}
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
PerformanceGradedContent
,
self
)
.
get_context_data
(
**
kwargs
)
context
=
super
(
PerformanceGradedContent
,
self
)
.
get_context_data
(
**
kwargs
)
...
@@ -194,7 +220,12 @@ class PerformanceGradedContent(PerformanceGradedContentTemplateView):
...
@@ -194,7 +220,12 @@ class PerformanceGradedContent(PerformanceGradedContentTemplateView):
class
PerformanceGradedContentByType
(
PerformanceGradedContentTemplateView
):
class
PerformanceGradedContentByType
(
PerformanceGradedContentTemplateView
):
template_name
=
'courses/performance_graded_content_by_type.html'
template_name
=
'courses/performance_graded_content_by_type.html'
page_name
=
'performance_graded_content_by_type'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'graded'
,
'depth'
:
'section'
}
def
dispatch
(
self
,
request
,
*
args
,
**
kwargs
):
def
dispatch
(
self
,
request
,
*
args
,
**
kwargs
):
self
.
assignment_type
=
{
'name'
:
kwargs
[
'assignment_type'
]}
self
.
assignment_type
=
{
'name'
:
kwargs
[
'assignment_type'
]}
...
@@ -225,7 +256,12 @@ class PerformanceGradedContentByType(PerformanceGradedContentTemplateView):
...
@@ -225,7 +256,12 @@ class PerformanceGradedContentByType(PerformanceGradedContentTemplateView):
class
PerformanceAssignment
(
PerformanceGradedContentTemplateView
):
class
PerformanceAssignment
(
PerformanceGradedContentTemplateView
):
template_name
=
'courses/performance_assignment.html'
template_name
=
'courses/performance_assignment.html'
page_name
=
'performance_assignment'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'graded'
,
'depth'
:
'subsection'
}
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
PerformanceAssignment
,
self
)
.
get_context_data
(
**
kwargs
)
context
=
super
(
PerformanceAssignment
,
self
)
.
get_context_data
(
**
kwargs
)
...
@@ -244,7 +280,12 @@ class PerformanceAssignment(PerformanceGradedContentTemplateView):
...
@@ -244,7 +280,12 @@ class PerformanceAssignment(PerformanceGradedContentTemplateView):
class
PerformanceUngradedContent
(
PerformanceUngradedContentTemplateView
):
class
PerformanceUngradedContent
(
PerformanceUngradedContentTemplateView
):
template_name
=
'courses/performance_ungraded_content.html'
template_name
=
'courses/performance_ungraded_content.html'
page_name
=
'performance_ungraded_content'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'ungraded'
,
'depth'
:
''
}
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
PerformanceUngradedContent
,
self
)
.
get_context_data
(
**
kwargs
)
context
=
super
(
PerformanceUngradedContent
,
self
)
.
get_context_data
(
**
kwargs
)
...
@@ -260,7 +301,12 @@ class PerformanceUngradedContent(PerformanceUngradedContentTemplateView):
...
@@ -260,7 +301,12 @@ class PerformanceUngradedContent(PerformanceUngradedContentTemplateView):
class
PerformanceUngradedSection
(
PerformanceUngradedContentTemplateView
):
class
PerformanceUngradedSection
(
PerformanceUngradedContentTemplateView
):
template_name
=
'courses/performance_ungraded_by_section.html'
template_name
=
'courses/performance_ungraded_by_section.html'
page_name
=
'performance_ungraded_by_section'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'ungraded'
,
'depth'
:
'section'
}
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
PerformanceUngradedSection
,
self
)
.
get_context_data
(
**
kwargs
)
context
=
super
(
PerformanceUngradedSection
,
self
)
.
get_context_data
(
**
kwargs
)
...
@@ -277,7 +323,12 @@ class PerformanceUngradedSection(PerformanceUngradedContentTemplateView):
...
@@ -277,7 +323,12 @@ class PerformanceUngradedSection(PerformanceUngradedContentTemplateView):
class
PerformanceUngradedSubsection
(
PerformanceUngradedContentTemplateView
):
class
PerformanceUngradedSubsection
(
PerformanceUngradedContentTemplateView
):
template_name
=
'courses/performance_ungraded_by_subsection.html'
template_name
=
'courses/performance_ungraded_by_subsection.html'
page_name
=
'performance_ungraded_by_subsection'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'ungraded'
,
'depth'
:
'subsection'
}
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
PerformanceUngradedSubsection
,
self
)
.
get_context_data
(
**
kwargs
)
context
=
super
(
PerformanceUngradedSubsection
,
self
)
.
get_context_data
(
**
kwargs
)
...
@@ -296,7 +347,12 @@ class PerformanceUngradedSubsection(PerformanceUngradedContentTemplateView):
...
@@ -296,7 +347,12 @@ class PerformanceUngradedSubsection(PerformanceUngradedContentTemplateView):
class
PerformanceUngradedAnswerDistribution
(
PerformanceAnswerDistributionMixin
,
class
PerformanceUngradedAnswerDistribution
(
PerformanceAnswerDistributionMixin
,
PerformanceUngradedContentTemplateView
):
PerformanceUngradedContentTemplateView
):
template_name
=
'courses/performance_ungraded_answer_distribution.html'
template_name
=
'courses/performance_ungraded_answer_distribution.html'
page_name
=
'performance_ungraded_answer_distribution'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'ungraded'
,
'depth'
:
'problem'
}
page_title
=
_
(
'Performance: Problem Submissions'
)
page_title
=
_
(
'Performance: Problem Submissions'
)
...
@@ -327,7 +383,12 @@ class PerformanceLearningOutcomesMixin(PerformanceTemplateView):
...
@@ -327,7 +383,12 @@ class PerformanceLearningOutcomesMixin(PerformanceTemplateView):
class
PerformanceLearningOutcomesContent
(
PerformanceLearningOutcomesMixin
):
class
PerformanceLearningOutcomesContent
(
PerformanceLearningOutcomesMixin
):
template_name
=
'courses/performance_learning_outcomes_content.html'
template_name
=
'courses/performance_learning_outcomes_content.html'
page_name
=
'performance_learning_outcomes_content'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'outcomes'
,
'depth'
:
''
}
page_title
=
_
(
'Performance: Learning Outcomes'
)
page_title
=
_
(
'Performance: Learning Outcomes'
)
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
...
@@ -352,7 +413,12 @@ class PerformanceLearningOutcomesContent(PerformanceLearningOutcomesMixin):
...
@@ -352,7 +413,12 @@ class PerformanceLearningOutcomesContent(PerformanceLearningOutcomesMixin):
class
PerformanceLearningOutcomesSection
(
PerformanceLearningOutcomesMixin
):
class
PerformanceLearningOutcomesSection
(
PerformanceLearningOutcomesMixin
):
template_name
=
'courses/performance_learning_outcomes_section.html'
template_name
=
'courses/performance_learning_outcomes_section.html'
page_name
=
'performance_learning_outcomes_section'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'outcomes'
,
'depth'
:
'section'
}
page_title
=
_
(
'Performance: Learning Outcomes'
)
page_title
=
_
(
'Performance: Learning Outcomes'
)
has_part_id_param
=
False
has_part_id_param
=
False
...
@@ -386,7 +452,12 @@ class PerformanceLearningOutcomesAnswersDistribution(PerformanceAnswerDistributi
...
@@ -386,7 +452,12 @@ class PerformanceLearningOutcomesAnswersDistribution(PerformanceAnswerDistributi
PerformanceLearningOutcomesSection
):
PerformanceLearningOutcomesSection
):
template_name
=
'courses/performance_learning_outcomes_answer_distribution.html'
template_name
=
'courses/performance_learning_outcomes_answer_distribution.html'
page_title
=
_
(
'Performance: Problem Submissions'
)
page_title
=
_
(
'Performance: Problem Submissions'
)
page_name
=
'performance_learning_outcomes_answer_distribution'
page_name
=
{
'scope'
:
'course'
,
'lens'
:
'performance'
,
'report'
:
'outcomes'
,
'depth'
:
'problem'
}
has_part_id_param
=
True
has_part_id_param
=
True
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
...
...
analytics_dashboard/static/apps/learners/app/controller.js
View file @
6bfd5106
...
@@ -102,7 +102,13 @@ define(function(require) {
...
@@ -102,7 +102,13 @@ define(function(require) {
this
.
onLearnerCollectionUpdated
(
this
.
options
.
learnerCollection
);
this
.
onLearnerCollectionUpdated
(
this
.
options
.
learnerCollection
);
// track the "page" view
// track the "page" view
this
.
options
.
trackingModel
.
set
(
'page'
,
'learner_roster'
);
this
.
options
.
trackingModel
.
set
(
'page'
,
{
scope
:
'course'
,
lens
:
'learners'
,
report
:
'roster'
,
depth
:
''
,
name
:
'course_learners_details'
});
this
.
options
.
trackingModel
.
trigger
(
'segment:page'
);
this
.
options
.
trackingModel
.
trigger
(
'segment:page'
);
return
rosterView
;
return
rosterView
;
...
@@ -150,7 +156,13 @@ define(function(require) {
...
@@ -150,7 +156,13 @@ define(function(require) {
engagementTimelineModel
.
fetch
();
engagementTimelineModel
.
fetch
();
// track the "page" view
// track the "page" view
this
.
options
.
trackingModel
.
set
(
'page'
,
'learner_details'
);
this
.
options
.
trackingModel
.
set
(
'page'
,
{
scope
:
'course'
,
lens
:
'learners'
,
report
:
'details'
,
depth
:
''
,
name
:
'course_learners_details'
});
this
.
options
.
trackingModel
.
trigger
(
'segment:page'
);
this
.
options
.
trackingModel
.
trigger
(
'segment:page'
);
return
detailView
;
return
detailView
;
...
@@ -172,7 +184,13 @@ define(function(require) {
...
@@ -172,7 +184,13 @@ define(function(require) {
this
.
options
.
rootView
.
showChildView
(
'main'
,
notFoundView
);
this
.
options
.
rootView
.
showChildView
(
'main'
,
notFoundView
);
// track the "page" view
// track the "page" view
this
.
options
.
trackingModel
.
set
(
'page'
,
'learner_not_found'
);
this
.
options
.
trackingModel
.
set
(
'page'
,
{
scope
:
'course'
,
lens
:
'learners'
,
report
:
'learner_not_found'
,
depth
:
''
,
name
:
'course_learners_learner_not_found'
});
this
.
options
.
trackingModel
.
trigger
(
'segment:page'
);
this
.
options
.
trackingModel
.
trigger
(
'segment:page'
);
}
}
});
});
...
...
analytics_dashboard/static/js/views/tracking-view.js
View file @
6bfd5106
...
@@ -120,13 +120,62 @@ define(['backbone', 'jquery', 'underscore', 'utils/utils'],
...
@@ -120,13 +120,62 @@ define(['backbone', 'jquery', 'underscore', 'utils/utils'],
}
}
if
(
self
.
model
.
has
(
'page'
))
{
if
(
self
.
model
.
has
(
'page'
))
{
course
.
label
=
self
.
model
.
get
(
'page'
);
course
.
current_page
=
self
.
model
.
get
(
'page'
);
course
.
label
=
self
.
model
.
get
(
'page'
).
name
;
}
}
return
course
;
return
course
;
},
},
/**
/**
* Because of limitations on HTML element data attributes, we encode objects flately with hyphen separated
* keys and need to transform those keys/values back into objects.
*/
transformPropertiesFromHTMLAttributes
:
function
(
props
)
{
var
properties
=
props
,
targetNameParts
=
[],
parts
=
[
'scope'
,
'lens'
,
'report'
,
'depth'
],
part
,
i
;
// collapse target scope, lens, report, and depth to a target_page dict
if
(
'target-scope'
in
properties
)
{
properties
.
target_page
=
{
scope
:
properties
[
'target-scope'
]
||
''
,
lens
:
properties
[
'target-lens'
]
||
''
,
report
:
properties
[
'target-report'
]
||
''
,
depth
:
properties
[
'target-depth'
]
||
''
};
for
(
i
=
0
;
i
<
4
;
++
i
)
{
part
=
properties
.
target_page
[
parts
[
i
]];
if
(
part
!==
''
&&
part
!==
undefined
)
{
targetNameParts
.
push
(
part
);
}
}
properties
.
target_page
.
name
=
targetNameParts
.
join
(
'_'
);
}
delete
properties
[
'target-scope'
];
delete
properties
[
'target-lens'
];
delete
properties
[
'target-report'
];
delete
properties
[
'target-depth'
];
// convert hyphens to underscores for menu_depth and link_name
if
(
'menu-depth'
in
properties
)
{
properties
.
menu_depth
=
properties
[
'menu-depth'
]
||
''
;
delete
properties
[
'menu-depth'
];
}
if
(
'link-name'
in
properties
)
{
properties
.
link_name
=
properties
[
'link-name'
]
||
''
;
delete
properties
[
'link-name'
];
}
// create category from menu_depth and link_name if it is not defined
if
(
'menu_depth'
in
properties
&&
'link_name'
in
properties
&&
!
(
'category'
in
properties
))
{
properties
.
category
=
properties
.
menu_depth
+
'+'
+
properties
.
link_name
;
}
return
properties
;
},
/**
* Catch 'segment:track' events and create events and send
* Catch 'segment:track' events and create events and send
* to segment.io.
* to segment.io.
*
*
...
@@ -134,10 +183,11 @@ define(['backbone', 'jquery', 'underscore', 'utils/utils'],
...
@@ -134,10 +183,11 @@ define(['backbone', 'jquery', 'underscore', 'utils/utils'],
*/
*/
track
:
function
(
eventType
,
properties
)
{
track
:
function
(
eventType
,
properties
)
{
var
self
=
this
,
var
self
=
this
,
transformedProps
,
course
=
self
.
buildCourseProperties
();
course
=
self
.
buildCourseProperties
();
transformedProps
=
self
.
transformPropertiesFromHTMLAttributes
(
properties
);
// send event to segment including the course ID
// send event to segment including the course ID
self
.
segment
.
track
(
eventType
,
_
.
extend
(
course
,
propertie
s
));
self
.
segment
.
track
(
eventType
,
_
.
extend
(
course
,
transformedProp
s
));
},
},
/**
/**
...
...
analytics_dashboard/templates/brand.html
View file @
6bfd5106
...
@@ -2,7 +2,9 @@
...
@@ -2,7 +2,9 @@
{% load i18n %}
{% load i18n %}
{% load dashboard_extras %}
{% load dashboard_extras %}
<a
class=
"{{ class_prefix }}-brand"
href=
"/"
>
<a
class=
"{{ class_prefix }}-brand"
href=
"/"
data-track-type=
"click"
data-track-event=
"edx.bi.ui.menu.navigated"
data-track-category=
"insights_home"
data-track-url=
"/"
data-track-target-scope=
"insights"
data-track-target-lens=
"home"
data-track-menu-depth=
"home"
data-track-link-name=
"logo"
>
<div
class=
"{{ class_prefix }}-brand-logo"
alt=
"{% settings_value 'PLATFORM_NAME' %}"
></div>
<div
class=
"{{ class_prefix }}-brand-logo"
alt=
"{% settings_value 'PLATFORM_NAME' %}"
></div>
<span
class=
"{{ class_prefix }}-brand-app"
>
{% settings_value 'APPLICATION_NAME' %}
</span>
<span
class=
"{{ class_prefix }}-brand-app"
>
{% settings_value 'APPLICATION_NAME' %}
</span>
</a>
</a>
analytics_dashboard/templates/header.html
View file @
6bfd5106
...
@@ -19,7 +19,12 @@ Partial: App-wide header element
...
@@ -19,7 +19,12 @@ Partial: App-wide header element
{% if course_id %}
{% if course_id %}
<ul
class=
"nav navbar-nav"
>
<ul
class=
"nav navbar-nav"
>
<li>
<li>
<a
href=
"{% url 'courses:home' course_id=course_id %}"
class=
"navbar-link active-course-name"
>
{% firstof course_name course_id %}
</a>
<a
href=
"{% url 'courses:home' course_id=course_id %}"
class=
"navbar-link active-course-name"
data-track-type=
"click"
data-track-event=
"edx.bi.ui.menu.navigated"
data-track-category=
"course_home"
data-track-text=
"{% firstof course_name course_id}"
data-track-url=
"{% url 'courses:home' course_id=course_id %}"
data-track-target-scope=
"course"
data-track-target-lens=
"home"
data-track-menu-depth=
"home"
data-track-link-name=
"course_title"
>
{% firstof course_name course_id %}
</a>
</li>
</li>
</ul>
</ul>
{% endif %}
{% endif %}
...
...
analytics_dashboard/templates/lens-navigation.html
View file @
6bfd5106
...
@@ -10,7 +10,13 @@ Partial for displaying the lens navigation and the sections within the lenses.
...
@@ -10,7 +10,13 @@ Partial for displaying the lens navigation and the sections within the lenses.
<ul
class=
"nav navbar-nav"
>
<ul
class=
"nav navbar-nav"
>
<li>
<li>
{# Translators: This refers to the homepage of a course. #}
{# Translators: This refers to the homepage of a course. #}
<a
href=
"{% url 'courses:home' course_id=course_id %}"
class=
"course-label link-label"
>
{% trans "Course Home" %}
</a>
<a
href=
"{% url 'courses:home' course_id=course_id %}"
class=
"course-label link-label"
data-track-type=
"click"
data-track-event=
"edx.bi.ui.menu.navigated"
data-track-text=
"{% trans 'Course Home' %}"
data-track-url=
"{% url 'courses:home' course_id=course_id %}"
data-track-target-scope=
"course"
data-track-target-lens=
"home"
data-track-menu-depth=
"home"
data-track-link-name=
"course_home"
>
{% trans "Course Home" %}
</a>
</li>
</li>
<li
class=
"dropdown"
>
<li
class=
"dropdown"
>
<button
class=
"dropdown-toggle navbar-link"
data-toggle=
"dropdown"
id=
"lensPrimaryMenu"
<button
class=
"dropdown-toggle navbar-link"
data-toggle=
"dropdown"
id=
"lensPrimaryMenu"
...
@@ -28,7 +34,12 @@ Partial for displaying the lens navigation and the sections within the lenses.
...
@@ -28,7 +34,12 @@ Partial for displaying the lens navigation and the sections within the lenses.
<ul
id=
"lensDropdownMenu"
class=
"dropdown-menu"
aria-labelledby=
"lensPrimaryMenu"
tabindex=
"-1"
>
<ul
id=
"lensDropdownMenu"
class=
"dropdown-menu"
aria-labelledby=
"lensPrimaryMenu"
tabindex=
"-1"
>
{% for item in primary_nav_items %}
{% for item in primary_nav_items %}
<li>
<li>
<a
href=
"{{ item.href }}{{ item.fragment }}"
>
<a
href=
"{{ item.href }}{{ item.fragment }}"
data-track-type=
"click"
data-track-event=
"edx.bi.ui.menu.navigated"
data-track-text=
"{{ item.label }}"
data-track-url=
"{{ item.href }}{{ item.fragment }}"
data-track-target-scope=
"{{ item.scope }}"
data-track-target-lens=
"{{ item.lens }}"
data-track-target-report=
"{{ item.report }}"
data-track-target-depth=
"{{ item.depth }}"
data-track-menu-depth=
"lens"
data-track-link-name=
"{{ item.lens }}"
>
<span
class=
"link-label"
>
<span
class=
"link-label"
>
<span
class=
"ico fa {{ item.icon }}"
aria-hidden=
"true"
></span>
{{ item.label }}
<span
class=
"ico fa {{ item.icon }}"
aria-hidden=
"true"
></span>
{{ item.label }}
</span>
</span>
...
@@ -38,7 +49,7 @@ Partial for displaying the lens navigation and the sections within the lenses.
...
@@ -38,7 +49,7 @@ Partial for displaying the lens navigation and the sections within the lenses.
</ul>
</ul>
</li>
</li>
{% include "submenu_navigation.html" with nav_items=secondary_nav_items%}
{% include "submenu_navigation.html" with nav_items=secondary_nav_items
lens=primary_nav_item.label|lower
%}
</ul>
</ul>
</div>
</div>
</nav>
</nav>
...
...
analytics_dashboard/templates/submenu_navigation.html
View file @
6bfd5106
...
@@ -2,7 +2,11 @@
...
@@ -2,7 +2,11 @@
{% for item in nav_items %}
{% for item in nav_items %}
<li
class=
"{% if item.active %}active{% endif %} nav-section"
>
<li
class=
"{% if item.active %}active{% endif %} nav-section"
>
<a
href=
"{{ item.href }}"
>
<a
href=
"{{ item.href }}"
data-track-type=
"click"
data-track-event=
"edx.bi.ui.menu.navigated"
data-track-text=
"{{ item.label }}"
data-track-url=
"{{ item.href }}"
data-track-target-scope=
"{{ item.scope }}"
data-track-target-lens=
"{{ item.lens }}"
data-track-target-report=
"{{ item.report }}"
data-track-target-depth=
"{{ item.depth }}"
data-track-menu-depth=
"depth"
data-track-link-name=
"{{ item.depth }}"
>
<span
class=
"link-label"
>
<span
class=
"link-label"
>
{{ item.label }}
{{ item.label }}
{% if item.active %}
{% if item.active %}
...
...
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