From a2b2b37ed722163451012db6a92096767880897c Mon Sep 17 00:00:00 2001 From: Adam Palay Date: Mon, 2 Jun 2014 14:08:45 -0400 Subject: [PATCH] adds user id to student profile information (LMS-2791) --- lms/djangoapps/analytics/basic.py | 2 +- lms/djangoapps/instructor/views/api.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lms/djangoapps/analytics/basic.py b/lms/djangoapps/analytics/basic.py index d812b10a0b..0ec5876014 100644 --- a/lms/djangoapps/analytics/basic.py +++ b/lms/djangoapps/analytics/basic.py @@ -8,7 +8,7 @@ from django.contrib.auth.models import User import xmodule.graders as xmgraders -STUDENT_FEATURES = ('username', 'first_name', 'last_name', 'is_staff', 'email') +STUDENT_FEATURES = ('id', 'username', 'first_name', 'last_name', 'is_staff', 'email') PROFILE_FEATURES = ('name', 'language', 'location', 'year_of_birth', 'gender', 'level_of_education', 'mailing_address', 'goals') AVAILABLE_FEATURES = STUDENT_FEATURES + PROFILE_FEATURES diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index 794ee66e29..94bcaefa84 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -565,8 +565,9 @@ def get_students_features(request, course_id, csv=False): # pylint: disable=W06 available_features = analytics.basic.AVAILABLE_FEATURES query_features = [ - 'username', 'name', 'email', 'language', 'location', 'year_of_birth', - 'gender', 'level_of_education', 'mailing_address', 'goals' + 'id', '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) @@ -575,6 +576,7 @@ def get_students_features(request, course_id, csv=False): # pylint: disable=W06 # will be displayed in the table generated in data_download.coffee. It is not (yet) # used as the header row in the CSV, but could be in the future. query_features_names = { + 'id': _('User ID'), 'username': _('Username'), 'name': _('Name'), 'email': _('Email'),