Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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-platform
Commits
454da6fe
Commit
454da6fe
authored
Mar 21, 2014
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i18n Inst Dash enrolled students profile table
LMS-2357
parent
c2933d92
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
lms/djangoapps/instructor/views/api.py
+20
-2
lms/static/coffee/src/instructor_dashboard/data_download.coffee
+1
-1
No files found.
lms/djangoapps/instructor/views/api.py
View file @
454da6fe
...
...
@@ -511,17 +511,35 @@ def get_students_features(request, course_id, csv=False): # pylint: disable=W06
TO DO accept requests for different attribute sets.
"""
available_features
=
analytics
.
basic
.
AVAILABLE_FEATURES
query_features
=
[
'username'
,
'name'
,
'email'
,
'language'
,
'location'
,
'year_of_birth'
,
'gender'
,
'level_of_education'
,
'mailing_address'
,
'goals'
]
query_features
=
[
'username'
,
'name'
,
'email'
,
'language'
,
'location'
,
'year_of_birth'
,
'gender'
,
'level_of_education'
,
'mailing_address'
,
'goals'
]
student_data
=
analytics
.
basic
.
enrolled_students_features
(
course_id
,
query_features
)
# Scrape the query features for i18n - can't translate here because it breaks further queries
# and how the coffeescript works. The actual translation will be done in data_download.coffee
query_features_names
=
{
'username'
:
_
(
'Username'
),
'name'
:
_
(
'Name'
),
'email'
:
_
(
'Email'
),
'language'
:
_
(
'Language'
),
'location'
:
_
(
'Location'
),
'year_of_birth'
:
_
(
'Birth Year'
),
'gender'
:
_
(
'Gender'
),
'level_of_education'
:
_
(
'Level of Education'
),
'mailing_address'
:
_
(
'Mailing Address'
),
'goals'
:
_
(
'Goals'
),
}
if
not
csv
:
response_payload
=
{
'course_id'
:
course_id
,
'students'
:
student_data
,
'students_count'
:
len
(
student_data
),
'queried_features'
:
query_features
,
'feature_names'
:
query_features_names
,
'available_features'
:
available_features
,
}
return
JsonResponse
(
response_payload
)
...
...
lms/static/coffee/src/instructor_dashboard/data_download.coffee
View file @
454da6fe
...
...
@@ -75,7 +75,7 @@ class DataDownload
forceFitColumns
:
true
rowHeight
:
35
columns
=
({
id
:
feature
,
field
:
feature
,
name
:
feature
}
for
feature
in
data
.
queried_features
)
columns
=
({
id
:
feature
,
field
:
feature
,
name
:
data
.
feature_names
[
feature
]
}
for
feature
in
data
.
queried_features
)
grid_data
=
data
.
students
$table_placeholder
=
$
'<div/>'
,
class
:
'slickgrid'
...
...
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