From ddc93abf819a2bd86fc93eafd0827b14d14e2b41 Mon Sep 17 00:00:00 2001 From: Chris Rodriguez Date: Fri, 1 Jul 2016 07:44:16 -0400 Subject: [PATCH] AC-521 fixes `data-table` ignores in the platform --- .../lms/test_lms_instructor_dashboard.py | 3 +- .../tests/views/test_instructor_dashboard.py | 19 ++++----- .../coffee/fixtures/autoenrollment.html | 6 +-- lms/templates/ccx/enrollment.html | 10 ++--- .../instructor_dashboard_2/certificates.html | 6 +-- .../instructor_dashboard_2/course_info.html | 42 ++++++++++--------- 6 files changed, 44 insertions(+), 42 deletions(-) diff --git a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py index 1da51f7108..adaad82053 100644 --- a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py +++ b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py @@ -60,8 +60,8 @@ class LMSInstructorDashboardA11yTest(BaseInstructorDashboardTest): def test_instructor_dashboard_a11y(self): self.instructor_dashboard_page.a11y_audit.config.set_rules({ "ignore": [ + 'checkboxgroup', # TODO: AC-552 'link-href', # TODO: AC-491 - 'data-table', # TODO: AC-491 ] }) self.instructor_dashboard_page.a11y_audit.check_for_accessibility_errors() @@ -1270,7 +1270,6 @@ class CertificateInvalidationTest(BaseInstructorDashboardTest): ]) self.certificates_section.a11y_audit.config.set_rules({ "ignore": [ - 'data-table', # TODO: AC-491 'aria-valid-attr-value', # TODO: AC-491 'checkboxgroup', # TODO: AC-491 'color-contrast', # TODO: AC-491 diff --git a/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py b/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py index 6f3522a8a9..9f0103387d 100644 --- a/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py +++ b/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py @@ -149,10 +149,10 @@ class TestInstructorDashboard(ModuleStoreTestCase, LoginEnrollmentTestCase, XssT # enrollment information visible self.assertIn('

Enrollment Information

', response.content) - self.assertTrue('Verified' in response.content) - self.assertTrue('Audit' in response.content) - self.assertTrue('Honor' in response.content) - self.assertTrue('Professional' in response.content) + self.assertIn('Verified', response.content) + self.assertIn('Audit', response.content) + self.assertIn('Honor', response.content) + self.assertIn('Professional', response.content) # dashboard link hidden self.assertFalse(self.get_dashboard_enrollment_message() in response.content) @@ -166,11 +166,10 @@ class TestInstructorDashboard(ModuleStoreTestCase, LoginEnrollmentTestCase, XssT users = [UserFactory() for _ in range(2)] CourseEnrollment.enroll(users[0], self.course.id, mode="professional") CourseEnrollment.enroll(users[1], self.course.id, mode="no-id-professional") - response = self.client.get(self.url) # Check that the number of professional enrollments is two - self.assertContains(response, "Professional2") + self.assertContains(response, 'Professional2') @patch.dict(settings.FEATURES, {'DISPLAY_ANALYTICS_ENROLLMENTS': False}) @override_settings(ANALYTICS_DASHBOARD_URL='http://example.com') @@ -182,10 +181,10 @@ class TestInstructorDashboard(ModuleStoreTestCase, LoginEnrollmentTestCase, XssT response = self.client.get(self.url) # enrollment information hidden - self.assertFalse('Verified' in response.content) - self.assertFalse('Audit' in response.content) - self.assertFalse('Honor' in response.content) - self.assertFalse('Professional' in response.content) + self.assertNotIn('Verified', response.content) + self.assertNotIn('Audit', response.content) + self.assertNotIn('Honor', response.content) + self.assertNotIn('Professional', response.content) # link to dashboard shown expected_message = self.get_dashboard_enrollment_message() diff --git a/lms/static/coffee/fixtures/autoenrollment.html b/lms/static/coffee/fixtures/autoenrollment.html index 2e010a1533..22adbed4b8 100644 --- a/lms/static/coffee/fixtures/autoenrollment.html +++ b/lms/static/coffee/fixtures/autoenrollment.html @@ -1,8 +1,8 @@
-

${_("Register/Enroll Students")}

+

Register/Enroll Students

- ${_("To register and enroll a list of users in this course, choose a CSV file that contains the following columns in this exact order: email, username, name, and country. Please include one student per row and do not include any headers, footers, or blank lines.")} + To register and enroll a list of users in this course, choose a CSV file that contains the following columns in this exact order: email, username, name, and country. Please include one student per row and do not include any headers, footers, or blank lines.

@@ -17,4 +17,4 @@
-
\ No newline at end of file + diff --git a/lms/templates/ccx/enrollment.html b/lms/templates/ccx/enrollment.html index 33cf9d943d..07f5cb4d08 100644 --- a/lms/templates/ccx/enrollment.html +++ b/lms/templates/ccx/enrollment.html @@ -67,7 +67,7 @@ from openedx.core.djangolib.markup import HTML, Text
-

${_("Student List Management")}

+

${_("Student List Management")}

%if messages:
@@ -79,9 +79,9 @@ from openedx.core.djangolib.markup import HTML, Text - - - + + + @@ -89,7 +89,7 @@ from openedx.core.djangolib.markup import HTML, Text - + %endfor diff --git a/lms/templates/instructor/instructor_dashboard_2/certificates.html b/lms/templates/instructor/instructor_dashboard_2/certificates.html index c2638d969c..914927d714 100644 --- a/lms/templates/instructor/instructor_dashboard_2/certificates.html +++ b/lms/templates/instructor/instructor_dashboard_2/certificates.html @@ -143,9 +143,9 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str
UsernameEmailRevoke accessUsernameEmailRevoke access
${member.user} ${member.user.email} ${_("Revoke access")}
- - - + + + diff --git a/lms/templates/instructor/instructor_dashboard_2/course_info.html b/lms/templates/instructor/instructor_dashboard_2/course_info.html index bccfe6388a..357672bd22 100644 --- a/lms/templates/instructor/instructor_dashboard_2/course_info.html +++ b/lms/templates/instructor/instructor_dashboard_2/course_info.html @@ -9,26 +9,30 @@ from openedx.core.djangolib.markup import HTML, Text
%if settings.FEATURES.get('DISPLAY_ANALYTICS_ENROLLMENTS'): ## Translators: 'track' refers to the enrollment type ('honor', 'verified', or 'audit') - ${_("Number of enrollees (admins, staff, and students) by track")} -

<% modes = section_data['enrollment_count'] %> -
${_('Task name')}${_('Date')}${_('Details')}
- - - - - - - - - - - - - - - -
${_("Verified")}${modes['verified']}
${_("Audit")}${modes['audit']}
${_("Honor")}${modes['honor']}
${_("Professional")}${modes['professional'] + modes['no-id-professional']}
${_("Total")}${modes['total']}
+ + + + + + + + + + + + + + + + + + +
${_("Number of enrollees (admins, staff, and students) by track")}
${_("Verified")}${modes['verified']}
${_("Audit")}${modes['audit']}
${_("Honor")}${modes['honor']}
${_("Professional")}${modes['professional'] + modes['no-id-professional']}
+ ${_("Total")} + + ${modes['total']} +
%elif section_data.get('enrollment_message'):

${section_data['enrollment_message']}

%endif