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
19117557
Commit
19117557
authored
Jun 06, 2017
by
Dennis Jen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add passing learners column and put behind feature flag.
parent
40b85fc4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
60 additions
and
17 deletions
+60
-17
.travis/docker-compose-travis.yml
+1
-0
Makefile
+3
-0
README.md
+1
-0
acceptance_tests/__init__.py
+2
-1
acceptance_tests/test_course_index.py
+5
-1
analytics_dashboard/conf/locale/en/LC_MESSAGES/django.mo
+0
-0
analytics_dashboard/conf/locale/en/LC_MESSAGES/django.po
+7
-7
analytics_dashboard/conf/locale/en/LC_MESSAGES/djangojs.mo
+0
-0
analytics_dashboard/conf/locale/en/LC_MESSAGES/djangojs.po
+0
-0
analytics_dashboard/courses/views/course_summaries.py
+2
-2
analytics_dashboard/static/apps/course-list/app/app.js
+2
-1
analytics_dashboard/static/apps/course-list/app/course-list-main.js
+2
-1
analytics_dashboard/static/apps/course-list/app/spec/controller-spec.js
+1
-0
analytics_dashboard/static/apps/course-list/common/collections/course-list.js
+4
-0
analytics_dashboard/static/apps/course-list/common/models/course.js
+1
-0
analytics_dashboard/static/apps/course-list/common/models/spec/course-spec.js
+1
-0
analytics_dashboard/static/apps/course-list/list/views/base-header-cell.js
+2
-1
analytics_dashboard/static/apps/course-list/list/views/spec/course-list-spec.js
+25
-2
analytics_dashboard/static/apps/course-list/list/views/table.js
+1
-1
No files found.
.travis/docker-compose-travis.yml
View file @
19117557
...
...
@@ -33,6 +33,7 @@ services:
ENABLE_ERROR_PAGE_TESTS
:
"
False"
DISPLAY_LEARNER_ANALYTICS
:
"
True"
ENABLE_COURSE_LIST_FILTERS
:
"
True"
ENABLE_COURSE_LIST_PASSING
:
"
True"
depends_on
:
-
"
es"
-
"
analyticsapi"
Makefile
View file @
19117557
...
...
@@ -47,6 +47,9 @@ endif
ifeq
(
"${ENABLE_COURSE_LIST_FILTERS}"
,
"True"
)
./manage.py
waffle_switch
enable_course_filters
on
--create
endif
ifeq
(
"${ENABLE_COURSE_LIST_PASSING}"
,
"True"
)
./manage.py
waffle_switch
enable_course_passing
on
--create
endif
./manage.py
create_acceptance_test_soapbox_messages
nosetests
-v
acceptance_tests
-e
NUM_PROCESSES
=
1
--exclude-dir
=
acceptance_tests/course_validation
./manage.py
delete_acceptance_test_soapbox_messages
...
...
README.md
View file @
19117557
...
...
@@ -244,6 +244,7 @@ when executing either of the commands above.
| ENABLE_OAUTH_TESTS | Test the OAUTH sign-in process | true |
| ENABLE_AUTO_AUTH | Sign-in using auto-auth. (no LMS involved) | false |
| ENABLE_COURSE_LIST_FILTERS | Tests on filtering the course list | false |
| ENABLE_COURSE_LIST_PASSING | Tests on the passing learners column in the course list | false |
Override example:
...
...
acceptance_tests/__init__.py
View file @
19117557
...
...
@@ -79,8 +79,9 @@ ENABLE_VIDEO_PREVIEW = str2bool(os.environ.get('ENABLE_VIDEO_PREVIEW', False))
# Learner analytics
DISPLAY_LEARNER_ANALYTICS
=
str2bool
(
os
.
environ
.
get
(
'DISPLAY_LEARNER_ANALYTICS'
,
False
))
#
Learner analytics
#
Course listing
ENABLE_COURSE_LIST_FILTERS
=
str2bool
(
os
.
environ
.
get
(
'ENABLE_COURSE_LIST_FILTERS'
,
False
))
ENABLE_COURSE_LIST_PASSING
=
str2bool
(
os
.
environ
.
get
(
'ENABLE_COURSE_LIST_PASSING'
,
False
))
# Soapbox Messages tests constants
SOAPBOX_GLOBAL_MESSAGE
=
'Test global message'
...
...
acceptance_tests/test_course_index.py
View file @
19117557
...
...
@@ -5,6 +5,7 @@ from selenium.webdriver.common.keys import Keys
from
acceptance_tests
import
(
ENABLE_COURSE_LIST_FILTERS
,
ENABLE_COURSE_LIST_PASSING
,
TEST_COURSE_ID
,
)
from
acceptance_tests.mixins
import
AnalyticsDashboardWebAppTestMixin
,
AnalyticsApiClientMixin
...
...
@@ -47,8 +48,11 @@ class CourseIndexTests(AnalyticsApiClientMixin, AnalyticsDashboardWebAppTestMixi
'Total Enrollment
\n
click to sort'
,
'Current Enrollment
\n
click to sort'
,
'Change Last Week
\n
click to sort'
,
'Verified Enrollment
\n
click to sort'
'Verified Enrollment
\n
click to sort'
,
]
if
ENABLE_COURSE_LIST_PASSING
:
columns
.
append
(
'Passing Learners
\n
click to sort'
)
self
.
assertTable
(
'.course-list-table'
,
columns
)
# Validate that we have a list of courses
...
...
analytics_dashboard/conf/locale/en/LC_MESSAGES/django.mo
View file @
19117557
No preview for this file type
analytics_dashboard/conf/locale/en/LC_MESSAGES/django.po
View file @
19117557
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-0
5 13:57+00
00\n"
"POT-Creation-Date: 2017-06-0
7 12:34-04
00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
...
...
@@ -54,8 +54,8 @@ msgid ""
msgstr ""
#: core/templates/core/landing.html:49
#: courses/tests/test_views/test_engagement.py:44
courses/views/__init__.py:304
#: courses/views/__init__.py:554
#: courses/tests/test_views/test_engagement.py:44
#: courses/views/__init__.py:
304 courses/views/__init__.py:
554
msgid "Engagement"
msgstr ""
...
...
@@ -1006,13 +1006,13 @@ msgid "Gender"
msgstr ""
#. Translators: Content as in course content (e.g. things, not the feeling)
#: courses/tests/test_views/test_engagement.py:62
courses/views/__init__.py:561
#: courses/views/engagement.py:27
#: courses/tests/test_views/test_engagement.py:62
#: courses/views/
__init__.py:561 courses/views/
engagement.py:27
msgid "Content"
msgstr ""
#: courses/tests/test_views/test_engagement.py:73
courses/views/__init__.py:574
#: courses/views/engagement.py:36
#: courses/tests/test_views/test_engagement.py:73
#: courses/views/
__init__.py:574 courses/views/
engagement.py:36
msgid "Videos"
msgstr ""
...
...
analytics_dashboard/conf/locale/en/LC_MESSAGES/djangojs.mo
View file @
19117557
No preview for this file type
analytics_dashboard/conf/locale/en/LC_MESSAGES/djangojs.po
View file @
19117557
This diff is collapsed.
Click to expand it.
analytics_dashboard/courses/views/course_summaries.py
View file @
19117557
...
...
@@ -47,8 +47,6 @@ class CourseIndex(CourseAPIMixin, LoginRequiredMixin, TrackedViewMixin, LastUpda
# The user is probably not a course administrator and should not be using this application.
raise
PermissionDenied
enable_course_filters
=
switch_is_active
(
'enable_course_filters'
)
summaries_presenter
=
CourseSummariesPresenter
()
summaries
,
last_updated
=
summaries_presenter
.
get_course_summaries
(
courses
)
...
...
@@ -56,9 +54,11 @@ class CourseIndex(CourseAPIMixin, LoginRequiredMixin, TrackedViewMixin, LastUpda
'update_message'
:
self
.
get_last_updated_message
(
last_updated
)
})
enable_course_filters
=
switch_is_active
(
'enable_course_filters'
)
data
=
{
'course_list_json'
:
summaries
,
'enable_course_filters'
:
enable_course_filters
,
'enable_passing_users'
:
switch_is_active
(
'enable_course_passing'
),
'course_list_download_url'
:
reverse
(
'courses:index_csv'
),
}
...
...
analytics_dashboard/static/apps/course-list/app/app.js
View file @
19117557
...
...
@@ -54,7 +54,8 @@ define(function(require) {
// Will be filled in dynamically by the initialize() function from the programsCollection models:
program_ids
:
{}
},
programsCollection
:
programsCollection
programsCollection
:
programsCollection
,
passingUsersEnabled
:
this
.
options
.
passingUsersEnabled
});
rootView
=
new
RootView
({
...
...
analytics_dashboard/static/apps/course-list/app/course-list-main.js
View file @
19117557
...
...
@@ -7,7 +7,8 @@ require(['vendor/domReady!', 'jquery', 'load/init-page',
courseListJson
:
modelData
.
get
(
'course_list_json'
),
programsJson
:
modelData
.
get
(
'programs_json'
),
courseListDownloadUrl
:
modelData
.
get
(
'course_list_download_url'
),
filteringEnabled
:
modelData
.
get
(
'enable_course_filters'
)
filteringEnabled
:
modelData
.
get
(
'enable_course_filters'
),
passingUsersEnabled
:
modelData
.
get
(
'enable_passing_users'
)
});
app
.
start
();
...
...
analytics_dashboard/static/apps/course-list/app/spec/controller-spec.js
View file @
19117557
...
...
@@ -29,6 +29,7 @@ define(function(require) {
pacing_type
:
Math
.
random
()
>
0.5
?
'instructor_paced'
:
'self_paced'
,
count
:
count
,
cumulative_count
:
parseInt
(
count
+
(
count
/
2
),
10
),
passing_users
:
0
,
enrollment_modes
:
{
audit
:
{
count
:
0
,
...
...
analytics_dashboard/static/apps/course-list/common/collections/course-list.js
View file @
19117557
...
...
@@ -82,6 +82,10 @@ define(function(require) {
this
.
registerSortableField
(
'count_change_7_days'
,
gettext
(
'Change Last Week'
));
this
.
registerSortableField
(
'verified_enrollment'
,
gettext
(
'Verified Enrollment'
));
if
(
options
.
passingUsersEnabled
)
{
this
.
registerSortableField
(
'passing_users'
,
gettext
(
'Passing Learners'
));
}
this
.
registerFilterableField
(
'availability'
,
gettext
(
'Availability'
));
this
.
registerFilterableField
(
'pacing_type'
,
gettext
(
'Pacing Type'
));
this
.
registerFilterableArrayField
(
'program_ids'
,
gettext
(
'Programs'
));
...
...
analytics_dashboard/static/apps/course-list/common/models/course.js
View file @
19117557
...
...
@@ -21,6 +21,7 @@ define(function(require) {
cumulative_count
:
0
,
count_change_7_days
:
0
,
verified_enrollment
:
0
,
passing_users
:
0
,
enrollment_modes
:
{
audit
:
{
count
:
0
,
...
...
analytics_dashboard/static/apps/course-list/common/models/spec/course-spec.js
View file @
19117557
...
...
@@ -19,6 +19,7 @@ define(function(require) {
cumulative_count
:
0
,
count_change_7_days
:
0
,
verified_enrollment
:
0
,
passing_users
:
0
,
enrollment_modes
:
{
audit
:
{
count
:
0
,
...
...
analytics_dashboard/static/apps/course-list/list/views/base-header-cell.js
View file @
19117557
...
...
@@ -15,7 +15,8 @@ define(function(require) {
count
:
gettext
(
'Learners currently enrolled in the course.'
),
count_change_7_days
:
gettext
(
'Net difference in current enrollment in the last week.'
),
// eslint-disable-next-line max-len
verified_enrollment
:
gettext
(
'Number of currently enrolled learners pursuing a verified certificate of achievement.'
)
verified_enrollment
:
gettext
(
'Number of currently enrolled learners pursuing a verified certificate of achievement.'
),
passing_users
:
gettext
(
'Learners who have earned a passing grade.'
)
}
});
...
...
analytics_dashboard/static/apps/course-list/list/views/spec/course-list-spec.js
View file @
19117557
...
...
@@ -50,7 +50,9 @@ define(function(require) {
defaultOptions
.
programCollectionOptions
);
if
(
defaultOptions
.
collectionOptions
===
undefined
)
{
defaultOptions
.
collectionOptions
=
{};
defaultOptions
.
collectionOptions
=
{
passingUsersEnabled
:
true
};
}
defaultOptions
.
collectionOptions
.
programsCollection
=
programsCollection
;
...
...
@@ -63,6 +65,7 @@ define(function(require) {
cumulative_count
:
20
,
count_change_7_days
:
30
,
verified_enrollment
:
40
,
passing_users
:
50
,
start_date
:
'2015-02-17T050000'
,
end_date
:
'2015-03-31T000000'
}),
...
...
@@ -73,6 +76,7 @@ define(function(require) {
cumulative_count
:
1000
,
count_change_7_days
:
-
10
,
verified_enrollment
:
1000
,
passing_users
:
2000
,
start_date
:
'2016-11-17T050000'
,
end_date
:
'2016-12-01T000000'
})],
...
...
@@ -127,6 +131,8 @@ define(function(require) {
Utils
.
localizeNumber
(
course
.
get
(
'count_change_7_days'
)));
expect
(
$
(
tr
).
find
(
'td.verified_enrollment'
)).
toContainText
(
Utils
.
localizeNumber
(
course
.
get
(
'verified_enrollment'
)));
expect
(
$
(
tr
).
find
(
'td.passing_users'
)).
toContainText
(
Utils
.
localizeNumber
(
course
.
get
(
'passing_users'
)));
});
});
...
...
@@ -202,6 +208,22 @@ define(function(require) {
});
});
describe
(
'passingUsersEnabled setting'
,
function
()
{
it
(
'shows column'
,
function
()
{
var
view
=
getCourseListView
({
collectionOptions
:
{
passingUsersEnabled
:
true
}
});
expect
(
view
.
$
(
'.passing_users'
)).
toContainText
(
'Passing Learners'
);
});
it
(
'hides column'
,
function
()
{
var
view
=
getCourseListView
({
collectionOptions
:
{
passingUsersEnabled
:
false
}
});
expect
(
view
.
$
(
'.passing_users'
)).
not
.
toBeInDOM
();
});
});
describe
(
'sorting'
,
function
()
{
var
clickSortingHeader
,
executeSortTest
,
...
...
@@ -264,7 +286,8 @@ define(function(require) {
cumulative_count
:
[
'cumulative_count'
],
count
:
[
'count'
],
count_change_7_days
:
[
'count_change_7_days'
],
verified_enrollment
:
[
'verified_enrollment'
]
verified_enrollment
:
[
'verified_enrollment'
],
passing_users
:
[
'passing_users'
]
},
function
(
column
,
isInitial
)
{
this
.
column
=
column
;
this
.
isInitial
=
isInitial
;
...
...
analytics_dashboard/static/apps/course-list/list/views/table.js
View file @
19117557
...
...
@@ -15,7 +15,7 @@ define(function(require) {
notAvailableTemplate
=
require
(
'text!course-list/list/templates/table-data-not-available.underscore'
),
Utils
=
require
(
'utils/utils'
),
INTEGER_COLUMNS
=
[
'count'
,
'cumulative_count'
,
'count_change_7_days'
,
'verified_enrollment'
],
INTEGER_COLUMNS
=
[
'count'
,
'cumulative_count'
,
'count_change_7_days'
,
'verified_enrollment'
,
'passing_users'
],
DATE_COLUMNS
=
[
'start_date'
,
'end_date'
],
CourseListTableView
;
...
...
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