diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index c37fb1bc9f..9a1bea222e 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -2,6 +2,7 @@ Instructor Dashboard Views """ +from django.utils.translation import ugettext as _ from django_future.csrf import ensure_csrf_cookie from django.views.decorators.cache import cache_control from mitxmako.shortcuts import render_to_response @@ -72,7 +73,7 @@ def _section_course_info(course_id): section_data = {} section_data['section_key'] = 'course_info' - section_data['section_display_name'] = 'Course Info' + section_data['section_display_name'] = _('Course Info') section_data['course_id'] = course_id section_data['course_display_name'] = course.display_name section_data['enrollment_count'] = CourseEnrollment.objects.filter(course_id=course_id).count() @@ -87,7 +88,7 @@ def _section_course_info(course_id): # section_data['offline_grades'] = offline_grades_available(course_id) try: - section_data['course_errors'] = [(escape(a), '') for (a, _) in modulestore().get_item_errors(course.location)] + section_data['course_errors'] = [(escape(a), '') for (a, _unused) in modulestore().get_item_errors(course.location)] except Exception: section_data['course_errors'] = [('Error fetching errors', '')] @@ -98,7 +99,7 @@ def _section_membership(course_id, access): """ Provide data for the corresponding dashboard section """ section_data = { 'section_key': 'membership', - 'section_display_name': 'Membership', + 'section_display_name': _('Membership'), 'access': access, 'enroll_button_url': reverse('students_update_enrollment', kwargs={'course_id': course_id}), 'unenroll_button_url': reverse('students_update_enrollment', kwargs={'course_id': course_id}), @@ -114,7 +115,7 @@ def _section_student_admin(course_id, access): """ Provide data for the corresponding dashboard section """ section_data = { 'section_key': 'student_admin', - 'section_display_name': 'Student Admin', + 'section_display_name': _('Student Admin'), 'access': access, 'get_student_progress_url_url': reverse('get_student_progress_url', kwargs={'course_id': course_id}), 'enrollment_url': reverse('students_update_enrollment', kwargs={'course_id': course_id}), @@ -129,7 +130,7 @@ def _section_data_download(course_id): """ Provide data for the corresponding dashboard section """ section_data = { 'section_key': 'data_download', - 'section_display_name': 'Data Download', + 'section_display_name': _('Data Download'), 'get_grading_config_url': reverse('get_grading_config', kwargs={'course_id': course_id}), 'get_students_features_url': reverse('get_students_features', kwargs={'course_id': course_id}), } @@ -140,7 +141,7 @@ def _section_analytics(course_id): """ Provide data for the corresponding dashboard section """ section_data = { 'section_key': 'analytics', - 'section_display_name': 'Analytics', + 'section_display_name': _('Analytics'), 'get_distribution_url': reverse('get_distribution', kwargs={'course_id': course_id}), 'proxy_legacy_analytics_url': reverse('proxy_legacy_analytics', kwargs={'course_id': course_id}), } diff --git a/lms/envs/common.py b/lms/envs/common.py index 0cbcbb774a..de78816a10 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -145,7 +145,7 @@ MITX_FEATURES = { 'ENABLE_INSTRUCTOR_BACKGROUND_TASKS': True, # Enable instructor dash beta version link - 'ENABLE_INSTRUCTOR_BETA_DASHBOARD': False, + 'ENABLE_INSTRUCTOR_BETA_DASHBOARD': True, # Allow use of the hint managment instructor view. 'ENABLE_HINTER_INSTRUCTOR_VIEW': False, diff --git a/lms/static/coffee/src/instructor_dashboard/membership.coffee b/lms/static/coffee/src/instructor_dashboard/membership.coffee index 733480e268..a50cd2c3dd 100644 --- a/lms/static/coffee/src/instructor_dashboard/membership.coffee +++ b/lms/static/coffee/src/instructor_dashboard/membership.coffee @@ -463,6 +463,8 @@ class Membership text: auth_list.$container.data 'display-name' data: auth_list: auth_list + if @auth_lists.length is 0 + @$list_selector.hide() @$list_selector.change => $opt = @$list_selector.children('option:selected') diff --git a/lms/templates/instructor/instructor_dashboard_2/analytics.html b/lms/templates/instructor/instructor_dashboard_2/analytics.html index 8469c1db93..baa446cf74 100644 --- a/lms/templates/instructor/instructor_dashboard_2/analytics.html +++ b/lms/templates/instructor/instructor_dashboard_2/analytics.html @@ -1,3 +1,4 @@ +<%! from django.utils.translation import ugettext as _ %> <%page args="section_data"/>
-

Batch Enrollment

-

Enter student emails separated by new lines or commas.

- +

${_("Batch Enrollment")}

+

${_("Enter student emails separated by new lines or commas.")}

+
- - - - + + + +
-

If auto enroll is checked, students who have not yet registered for edX will be automatically enrolled. - If auto enroll is left unchecked, students who have not yet registered for edX will not be enrolled, - but will be allowed to enroll. +

${_("If auto enroll is checked, students who have not yet registered for edX will be automatically enrolled.")} + ${_("If auto enroll is left unchecked, students who have not yet registered for edX will not be enrolled, but will be allowed to enroll.")}

@@ -46,80 +46,92 @@
-

Administration List Management

+

${_("Administration List Management")}

- %if section_data['access']['instructor']: -
- - %if section_data['access']['instructor']: -
- %endif - -
+ %if not section_data['access']['instructor']: +

+ ${_("Staff cannot modify staff or beta tester lists. To modify these lists, " + "contact your instructor and ask them to add you as an instructor for staff " + "and beta lists, or a forum admin for forum management.")} +

%endif %if section_data['access']['instructor']: -
+
+ +
+ +
+ +
%endif %if section_data['access']['instructor'] or section_data['access']['forum_admin']:
%endif diff --git a/lms/templates/instructor/instructor_dashboard_2/student_admin.html b/lms/templates/instructor/instructor_dashboard_2/student_admin.html index bf99fcea57..2ccef2164c 100644 --- a/lms/templates/instructor/instructor_dashboard_2/student_admin.html +++ b/lms/templates/instructor/instructor_dashboard_2/student_admin.html @@ -1,50 +1,52 @@ +<%! from django.utils.translation import ugettext as _ %> <%page args="section_data"/>
-

Student-specific grade adjustment

+

${_("Student-specific grade adjustment")}

- +

- - + + ##

Specify a particular problem in the course here by its url:

- +

- You may use just the "urlname" if a problem, or "modulename/urlname" if not. - (For example, if the location is i4x://university/course/problem/problemname, - then just provide the problemname. - If the location is i4x://university/course/notaproblem/someothername, then - provide notaproblem/someothername.) + ${_('You may use just the "urlname" if a problem, or "modulename/urlname" if not. (For example, if the location is {location1}, then just provide the {urlname1}. If the location is {location2}, then provide {urlname2}.)').format( + location1="i4x://university/course/problem/problemname", + urlname1="problemname", + location2="i4x://university/course/notaproblem/someothername", + urlname2="notaproblem/someothername") + }

- + %if section_data['access']['instructor']:

You may also delete the entire state of a student for the specified module:

- + %endif %if settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS') and section_data['access']['instructor']: - + %endif %if settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS') and section_data['access']['instructor']:

- Rescoring runs in the background, and status for active tasks will appear in a table below. - To see status for all tasks submitted for this course and student, click on this button: + ${_("Rescoring runs in the background, and status for active tasks will appear in a table below. " + "To see status for all tasks submitted for this problem and student, click on this button:")}

- +
%endif
@@ -56,26 +58,28 @@

- Specify a particular problem in the course here by its url: + ${_("Specify a particular problem in the course here by its url:")}

- You may use just the "urlname" if a problem, or "modulename/urlname" if not. - (For example, if the location is i4x://university/course/problem/problemname, - then just provide the problemname. - If the location is i4x://university/course/notaproblem/someothername, then - provide notaproblem/someothername.) + ${_('You may use just the "urlname" if a problem, or "modulename/urlname" if not. (For example, if the location is {location1}, then just provide the {urlname1}. If the location is {location2}, then provide {urlname2}.)').format( + location1="i4x://university/course/problem/problemname", + urlname1="problemname", + location2="i4x://university/course/notaproblem/someothername", + urlname2="notaproblem/someothername") + }

- Then select an action: - - + ${_("Then select an action")}: + +

-

These actions run in the background, and status for active tasks will appear in a table below. - To see status for all tasks submitted for this problem, click on this button: +

+ ${_("These actions run in the background, and status for active tasks will appear in a table below. " + "To see status for all tasks submitted for this problem, click on this button")}:

- +

@@ -83,7 +87,7 @@

-

Pending Instructor Tasks

+

${_("Pending Instructor Tasks")}

%endif