diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index 8fbd22a4c5..f140b02f15 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -23,10 +23,12 @@ from courseware.access import has_access from courseware.courses import get_course_with_access, get_course_by_id from django.contrib.auth.models import User from django_comment_client.utils import has_forum_access -from django_comment_common.models import (Role, - FORUM_ROLE_ADMINISTRATOR, - FORUM_ROLE_MODERATOR, - FORUM_ROLE_COMMUNITY_TA) +from django_comment_common.models import ( + Role, + FORUM_ROLE_ADMINISTRATOR, + FORUM_ROLE_MODERATOR, + FORUM_ROLE_COMMUNITY_TA, +) from courseware.models import StudentModule from student.models import unique_id_for_user diff --git a/lms/static/coffee/src/instructor_dashboard/data_download.coffee b/lms/static/coffee/src/instructor_dashboard/data_download.coffee index c491abec18..f977199f0d 100644 --- a/lms/static/coffee/src/instructor_dashboard/data_download.coffee +++ b/lms/static/coffee/src/instructor_dashboard/data_download.coffee @@ -18,6 +18,7 @@ class DataDownload @$section.data 'wrapper', @ # gather elements @$list_studs_btn = @$section.find("input[name='list-profiles']'") + @$list_studs_csv_btn = @$section.find("input[name='list-profiles-csv']'") @$list_anon_btn = @$section.find("input[name='list-anon-ids']'") @$grade_config_btn = @$section.find("input[name='dump-gradeconf']'") @$calculate_grades_csv_btn = @$section.find("input[name='calculate-grades-csv']'") @@ -43,6 +44,13 @@ class DataDownload # this handler binds to both the download # and the csv button + @$list_studs_csv_btn.click (e) => + url = @$list_studs_btn.data 'endpoint' + # handle csv special case + # redirect the document to the csv file. + url += '/csv' + location.href = url + @$list_studs_btn.click (e) => url = @$list_studs_btn.data 'endpoint' diff --git a/lms/templates/instructor/instructor_dashboard_2/data_download.html b/lms/templates/instructor/instructor_dashboard_2/data_download.html index db59caa770..9e1c9fa73c 100644 --- a/lms/templates/instructor/instructor_dashboard_2/data_download.html +++ b/lms/templates/instructor/instructor_dashboard_2/data_download.html @@ -6,14 +6,19 @@
${_("The following button displays a list of all students enrolled in this course, along with profile information such as email address and username. The data can also be downloaded as a CSV file.")}
+${_("The following button generates a CSV file of all students enrolled in this course, along with profile information such as email address and username.")}
--
+ + + % if not disable_buttons: +${_("For smaller courses, profile information for enrolled students can be listed directly on this page:")}
+ + %endif +${_("Displays the grading configuration for the course. The grading configuration is the breakdown of graded subsections of the course (such as exams and problem sets), and can be changed on the 'Grading' page (under 'Settings') in Studio.")}
+${_("The following button displays the grading configuration for the course. The grading configuration is the breakdown of graded subsections of the course (such as exams and problem sets), and can be changed on the 'Grading' page (under 'Settings') in Studio.")}