AC-521 fixes data-table ignores in the platform
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -149,10 +149,10 @@ class TestInstructorDashboard(ModuleStoreTestCase, LoginEnrollmentTestCase, XssT
|
||||
|
||||
# enrollment information visible
|
||||
self.assertIn('<h3 class="hd hd-3">Enrollment Information</h3>', response.content)
|
||||
self.assertTrue('<td>Verified</td>' in response.content)
|
||||
self.assertTrue('<td>Audit</td>' in response.content)
|
||||
self.assertTrue('<td>Honor</td>' in response.content)
|
||||
self.assertTrue('<td>Professional</td>' in response.content)
|
||||
self.assertIn('<th scope="row">Verified</th>', response.content)
|
||||
self.assertIn('<th scope="row">Audit</th>', response.content)
|
||||
self.assertIn('<th scope="row">Honor</th>', response.content)
|
||||
self.assertIn('<th scope="row">Professional</th>', 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, "<td>Professional</td><td>2</td>")
|
||||
self.assertContains(response, '<th scope="row">Professional</th><td>2</td>')
|
||||
|
||||
@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('<td>Verified</td>' in response.content)
|
||||
self.assertFalse('<td>Audit</td>' in response.content)
|
||||
self.assertFalse('<td>Honor</td>' in response.content)
|
||||
self.assertFalse('<td>Professional</td>' in response.content)
|
||||
self.assertNotIn('<th scope="row">Verified</th>', response.content)
|
||||
self.assertNotIn('<th scope="row">Audit</th>', response.content)
|
||||
self.assertNotIn('<th scope="row">Honor</th>', response.content)
|
||||
self.assertNotIn('<th scope="row">Professional</th>', response.content)
|
||||
|
||||
# link to dashboard shown
|
||||
expected_message = self.get_dashboard_enrollment_message()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<div class="auto_enroll auto_enroll_csv">
|
||||
<h2> ${_("Register/Enroll Students")} </h2>
|
||||
<h3 class="hd hd-3">Register/Enroll Students</h3>
|
||||
|
||||
<p>
|
||||
${_("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.
|
||||
</p>
|
||||
|
||||
<form id="student-auto-enroll-form">
|
||||
@@ -17,4 +17,4 @@
|
||||
<button type="submit" name="enrollment_signup_button">${_("Upload CSV")}</button>
|
||||
</form>
|
||||
<div class="results"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -67,7 +67,7 @@ from openedx.core.djangolib.markup import HTML, Text
|
||||
<div class="auth-list-container active">
|
||||
<div class="member-list-widget">
|
||||
<div class="member-list">
|
||||
<h2> ${_("Student List Management")}</h2>
|
||||
<h2 class="hd hd-2">${_("Student List Management")}</h2>
|
||||
%if messages:
|
||||
<label for="ccx_std_list_messages" class="sr">${_("CCX student list management response message")}</label>
|
||||
<div id="ccx_std_list_messages" tabindex="-1" class="request-response-error">
|
||||
@@ -79,9 +79,9 @@ from openedx.core.djangolib.markup import HTML, Text
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="label">Username</td>
|
||||
<td class="label">Email</td>
|
||||
<td class="label">Revoke access</td>
|
||||
<th class="label" scope="col">Username</th>
|
||||
<th class="label" scope="col">Email</th>
|
||||
<th class="label" scope="col">Revoke access</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -89,7 +89,7 @@ from openedx.core.djangolib.markup import HTML, Text
|
||||
<tr>
|
||||
<td>${member.user}</td>
|
||||
<td>${member.user.email}</td>
|
||||
<td><a class="revoke"><span class="fa fa-times-circle" aria-hidden="true"></span> ${_("Revoke access")}</a></td>
|
||||
<td><button type="button" class="revoke"><span class="fa fa-times-circle" aria-hidden="true"></span>${_("Revoke access")}</button></td>
|
||||
</tr>
|
||||
%endfor
|
||||
</tbody>
|
||||
|
||||
@@ -143,9 +143,9 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="task-name"></td>
|
||||
<td class="task-date"></td>
|
||||
<td class="task-details"></td>
|
||||
<th class="task-name" scope="col">${_('Task name')}</th>
|
||||
<th class="task-date" scope="col">${_('Date')}</th>
|
||||
<th class="task-details" scope="col">${_('Details')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -9,26 +9,30 @@ from openedx.core.djangolib.markup import HTML, Text
|
||||
<div class="enrollment-wrapper">
|
||||
%if settings.FEATURES.get('DISPLAY_ANALYTICS_ENROLLMENTS'):
|
||||
## Translators: 'track' refers to the enrollment type ('honor', 'verified', or 'audit')
|
||||
<span class="tip">${_("Number of enrollees (admins, staff, and students) by track")}</span>
|
||||
<br/><br/>
|
||||
<% modes = section_data['enrollment_count'] %>
|
||||
<table>
|
||||
<tr>
|
||||
<td>${_("Verified")}</td><td>${modes['verified']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>${_("Audit")}</td><td>${modes['audit']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>${_("Honor")}</td><td>${modes['honor']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>${_("Professional")}</td><td>${modes['professional'] + modes['no-id-professional']}</td>
|
||||
</tr>
|
||||
<tr style="color:green;border-top:1px solid #000">
|
||||
<td style="padding-top:10px;"><b>${_("Total")}</b></td><td style="padding-top:10px;"><b>${modes['total']}</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<caption class="tip">${_("Number of enrollees (admins, staff, and students) by track")}</caption>
|
||||
<tr>
|
||||
<th scope="row">${_("Verified")}</th><td>${modes['verified']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">${_("Audit")}</th><td>${modes['audit']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">${_("Honor")}</th><td>${modes['honor']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">${_("Professional")}</th><td>${modes['professional'] + modes['no-id-professional']}</td>
|
||||
</tr>
|
||||
<tr style="color:green;border-top:1px solid #000">
|
||||
<th scope="row" style="padding-top:10px;">
|
||||
<strong>${_("Total")}</strong>
|
||||
</th>
|
||||
<td style="padding-top:10px;">
|
||||
<strong>${modes['total']}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
%elif section_data.get('enrollment_message'):
|
||||
<p>${section_data['enrollment_message']}</p>
|
||||
%endif
|
||||
|
||||
Reference in New Issue
Block a user