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
a9cdf830
Commit
a9cdf830
authored
Dec 21, 2015
by
Daniel Friedman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add learner analytics UI scaffolding
AN-6199
parent
f0459481
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
112 additions
and
3 deletions
+112
-3
acceptance_tests/pages.py
+10
-0
acceptance_tests/test_course_learners.py
+20
-0
analytics_dashboard/courses/templates/courses/learners.html
+18
-0
analytics_dashboard/courses/urls.py
+7
-1
analytics_dashboard/courses/views/__init__.py
+32
-0
analytics_dashboard/courses/views/learners.py
+14
-0
analytics_dashboard/static/js/config.js
+2
-1
analytics_dashboard/static/js/learners-main.js
+3
-0
bower.json
+2
-1
build.js
+4
-0
No files found.
acceptance_tests/pages.py
View file @
a9cdf830
...
...
@@ -301,6 +301,16 @@ class CoursePerformanceAnswerDistributionPage(CoursePage):
self
.
browser
.
title
.
startswith
(
'Performance: Problem Submissions'
)
class
CourseLearnersPage
(
CoursePage
):
def
__init__
(
self
,
browser
,
course_id
=
None
):
super
(
CourseLearnersPage
,
self
)
.
__init__
(
browser
,
course_id
)
self
.
page_url
+=
'/learners/'
def
is_browser_on_page
(
self
):
return
super
(
CourseLearnersPage
,
self
)
.
is_browser_on_page
()
\
and
self
.
browser
.
title
.
startswith
(
'Learners'
)
class
ErrorPage
(
DashboardPage
):
error_code
=
None
error_title
=
None
...
...
acceptance_tests/test_course_learners.py
0 → 100644
View file @
a9cdf830
from
bok_choy.web_app_test
import
WebAppTest
from
acceptance_tests.mixins
import
CoursePageTestsMixin
from
acceptance_tests.pages
import
CourseLearnersPage
class
CourseLearnersTests
(
CoursePageTestsMixin
,
WebAppTest
):
def
setUp
(
self
):
super
(
CourseLearnersTests
,
self
)
.
setUp
()
self
.
page
=
CourseLearnersPage
(
self
.
browser
)
def
_test_data_update_message
(
self
):
# Don't test the update message for now, since it won't exist
# until the SPA adds it to the page in AN-6205.
pass
def
_get_data_update_message
(
self
):
# Don't test the update message for now, since it won't exist
# until the SPA adds it to the page in AN-6205.
return
''
analytics_dashboard/courses/templates/courses/learners.html
0 → 100644
View file @
a9cdf830
{% extends "courses/base-course.html" %}
{% load rjs %}
{% comment %}
View of individual learners within a course.
{% endcomment %}
{% block javascript %}
{{ block.super }}
<script
src=
"{% static_rjs 'js/learners-main.js' %}"
></script>
{% endblock javascript %}
{% block child_content %}
<div
class=
"learners-app-container"
>
<p>
TODO: put the app here!
</p>
</div>
{% endblock %}
analytics_dashboard/courses/urls.py
View file @
a9cdf830
...
...
@@ -4,7 +4,7 @@ from django.conf import settings
from
django.conf.urls
import
url
,
patterns
,
include
from
courses
import
views
from
courses.views
import
enrollment
,
engagement
,
performance
,
csv
from
courses.views
import
enrollment
,
engagement
,
performance
,
csv
,
learners
CONTENT_ID_PATTERN
=
r'(?P<content_id>(?:i4x://?[^/]+/[^/]+/[^/]+/[^@]+(?:@[^/]+)?)|(?:[^/]+))'
PROBLEM_PART_ID_PATTERN
=
CONTENT_ID_PATTERN
.
replace
(
'content_id'
,
'problem_part_id'
)
...
...
@@ -101,6 +101,11 @@ CSV_URLS = patterns(
name
=
'performance_answer_distribution'
),
)
LEARNER_URLS
=
patterns
(
''
,
url
(
r'^$'
,
learners
.
LearnersView
.
as_view
(),
name
=
'learners'
),
)
COURSE_URLS
=
patterns
(
''
,
# Course homepage. This should be the entry point for other applications linking to the course.
...
...
@@ -109,6 +114,7 @@ COURSE_URLS = patterns(
url
(
r'^engagement/'
,
include
(
ENGAGEMENT_URLS
,
namespace
=
'engagement'
)),
url
(
r'^performance/'
,
include
(
PERFORMANCE_URLS
,
namespace
=
'performance'
)),
url
(
r'^csv/'
,
include
(
CSV_URLS
,
namespace
=
'csv'
)),
url
(
r'^learners/'
,
include
(
LEARNER_URLS
,
namespace
=
'learners'
)),
)
urlpatterns
=
patterns
(
...
...
analytics_dashboard/courses/views/__init__.py
View file @
a9cdf830
...
...
@@ -298,6 +298,12 @@ class CourseNavBarMixin(object):
'view'
:
'courses:performance:graded_content'
,
'icon'
:
'fa-check-square-o'
,
'switch'
:
'enable_course_api'
,
},
{
'name'
:
'learners'
,
'label'
:
_
(
'Learners'
),
'view'
:
'courses:learners:learners'
,
'icon'
:
'fa-users'
,
}
]
...
...
@@ -516,6 +522,32 @@ class CourseHome(CourseTemplateWithNavView):
]
})
items
.
append
({
'name'
:
_
(
'Learners'
),
'icon'
:
'fa-users'
,
'heading'
:
_
(
'What are individual learners doing?'
),
'items'
:
[
{
'title'
:
_
(
'Who has been active recently?'
),
'view'
:
'courses:learners:learners'
,
# TODO: map this to the actual action in AN-6205
# TODO: what would the breadcrumbs be?
'breadcrumbs'
:
[
_
(
'TODO: what is this?'
)]
},
{
'title'
:
_
(
'Who is most engaged in the discussions?'
),
'view'
:
'courses:learners:learners'
,
# TODO: map this to the actual action in AN-6205
# TODO: what would the breadcrumbs be?
'breadcrumbs'
:
[
_
(
'TODO: what is this?'
)]
},
{
'title'
:
_
(
"Who hasn't watched videos recently?"
),
'view'
:
'courses:learners:learners'
,
# TODO: map this to the actual action in AN-6205
# TODO: what would the breadcrumbs be?
'breadcrumbs'
:
[
_
(
'TODO: what is this?'
)]
}
]
})
return
items
# pylint: disable=redefined-variable-type
...
...
analytics_dashboard/courses/views/learners.py
0 → 100644
View file @
a9cdf830
from
django.utils.translation
import
ugettext_lazy
as
_
from
courses.views
import
CourseTemplateWithNavView
class
LearnersView
(
CourseTemplateWithNavView
):
template_name
=
'courses/learners.html'
active_primary_nav_item
=
'learners'
page_title
=
_
(
'Learners'
)
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
LearnersView
,
self
)
.
get_context_data
(
**
kwargs
)
context
[
'page_data'
]
=
self
.
get_page_data
(
context
)
return
context
analytics_dashboard/static/js/config.js
View file @
a9cdf830
...
...
@@ -30,7 +30,8 @@ require.config({
'cldr-data'
:
'bower_components/cldr-data'
,
globalize
:
'bower_components/globalize/dist/globalize'
,
globalization
:
'js/utils/globalization'
,
collapsible
:
'bower_components/edx-ui-toolkit/components/views/collapsible-view'
collapsible
:
'bower_components/edx-ui-toolkit/components/views/collapsible-view'
,
marionette
:
'bower_components/marionette/lib/backbone.marionette.min'
},
wrapShim
:
true
,
shim
:
{
...
...
analytics_dashboard/static/js/learners-main.js
0 → 100644
View file @
a9cdf830
require
([],
function
()
{
'use strict'
;
});
bower.json
View file @
a9cdf830
...
...
@@ -28,6 +28,7 @@
"font-awesome"
:
"~4.2.0"
,
"natural-sort"
:
"overset/javascript-natural-sort#dbf4ca259b327a488bd1d7897fd46d80c414a7e0"
,
"cldr-data"
:
"26.0.3"
,
"edx-ui-toolkit"
:
"edx/edx-ui-toolkit#1e025d169f28632cf903274f3ef8aaf6e2fd6825"
"edx-ui-toolkit"
:
"edx/edx-ui-toolkit#1e025d169f28632cf903274f3ef8aaf6e2fd6825"
,
"marionette"
:
"~2.4.4"
}
}
build.js
View file @
a9cdf830
...
...
@@ -67,6 +67,10 @@
{
name
:
'js/performance-answer-distribution-main'
,
exclude
:
[
'js/common'
]
},
{
name
:
'js/learners-main'
,
exclude
:
[
'js/common'
]
}
]
})
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