From b97d0631812a95a8b063f4d76ef23eab0bb0276c Mon Sep 17 00:00:00 2001 From: Chris Rodriguez Date: Fri, 1 Jul 2016 10:59:24 -0400 Subject: [PATCH] AC-524 - label - test_lms_instructor_dashboard.py --- .../contentstore/features/course-updates.py | 2 +- .../pages/lms/instructor_dashboard.py | 4 +- .../lms/test_lms_instructor_dashboard.py | 4 +- .../coffee/fixtures/autoenrollment.html | 14 +- .../instructor_dashboard/membership.coffee | 2 +- .../views/certificate_bulk_whitelist.js | 8 +- .../certificates_bulk_exception_spec.js | 2 +- .../sass/course/instructor/_instructor_2.scss | 120 +++++++++++------- .../certificate-bulk-white-list.underscore | 15 ++- .../certificate-invalidation.underscore | 11 +- .../certificate-white-list-editor.underscore | 9 +- .../instructor_dashboard_2/certificates.html | 91 ++++++------- .../instructor_dashboard_2/membership.html | 13 +- 13 files changed, 164 insertions(+), 131 deletions(-) diff --git a/cms/djangoapps/contentstore/features/course-updates.py b/cms/djangoapps/contentstore/features/course-updates.py index 1e79a26b97..90db6bbd53 100644 --- a/cms/djangoapps/contentstore/features/course-updates.py +++ b/cms/djangoapps/contentstore/features/course-updates.py @@ -17,7 +17,7 @@ def go_to_updates(_step): @step(u'I add a new update with the text "([^"]*)"$') def add_update(_step, text): - update_css = 'a.new-update-button' + update_css = '.new-update-button' world.css_click(update_css) world.wait_for_visible('.CodeMirror') change_text(text) diff --git a/common/test/acceptance/pages/lms/instructor_dashboard.py b/common/test/acceptance/pages/lms/instructor_dashboard.py index e40e3332a3..20b42c9044 100644 --- a/common/test/acceptance/pages/lms/instructor_dashboard.py +++ b/common/test/acceptance/pages/lms/instructor_dashboard.py @@ -748,8 +748,8 @@ class MembershipPageAutoEnrollSection(PageObject): """ url = None - auto_enroll_browse_button_selector = '.auto_enroll_csv .file-browse input.file_field#browseBtn-auto_enroll_csv' - auto_enroll_upload_button_selector = '.auto_enroll_csv #submitBtn-auto_enroll_csv' + auto_enroll_browse_button_selector = '.auto_enroll_csv .file-browse input.file_field#browseBtn-auto-enroll' + auto_enroll_upload_button_selector = '.auto_enroll_csv button[name="enrollment_signup_button"]' batch_enrollment_selector = '.batch-enrollment' NOTIFICATION_ERROR = 'error' NOTIFICATION_WARNING = 'warning' 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 7c9c30d828..b022af36e2 100644 --- a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py +++ b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py @@ -1051,8 +1051,7 @@ class CertificatesTest(BaseInstructorDashboardTest): self.certificates_section.a11y_audit.config.set_rules({ "ignore": [ 'checkboxgroup', # TODO: AC-491 - 'duplicate-id', # TODO: AC-523 - 'label', # TODO: AC-524 + 'duplicate-id', # TODO: AC-491 'radiogroup', # TODO: AC-491 ] }) @@ -1269,7 +1268,6 @@ class CertificateInvalidationTest(BaseInstructorDashboardTest): "ignore": [ 'checkboxgroup', # TODO: AC-491 'duplicate-id', # TODO: AC-491 - 'label', # TODO: AC-491 'radiogroup', # TODO: AC-491 ] }) diff --git a/lms/static/coffee/fixtures/autoenrollment.html b/lms/static/coffee/fixtures/autoenrollment.html index abd26226d8..8c92ece9f6 100644 --- a/lms/static/coffee/fixtures/autoenrollment.html +++ b/lms/static/coffee/fixtures/autoenrollment.html @@ -7,14 +7,14 @@
- - -
- - -
+ + +
- +
diff --git a/lms/static/coffee/src/instructor_dashboard/membership.coffee b/lms/static/coffee/src/instructor_dashboard/membership.coffee index b5acbf4374..1f1febb087 100644 --- a/lms/static/coffee/src/instructor_dashboard/membership.coffee +++ b/lms/static/coffee/src/instructor_dashboard/membership.coffee @@ -186,7 +186,7 @@ class @AutoEnrollmentViaCsv @$students_list_file = @$container.find("input[name='students_list']") @$csrf_token = @$container.find("input[name='csrfmiddlewaretoken']") @$results = @$container.find("div.results") - @$browse_button = @$container.find("#browseBtn-auto_enroll_csv") + @$browse_button = @$container.find("#browseBtn-auto-enroll") @$browse_file = @$container.find("#browseFile") @processing = false diff --git a/lms/static/js/certificates/views/certificate_bulk_whitelist.js b/lms/static/js/certificates/views/certificate_bulk_whitelist.js index 31f22753c9..91a3fe93bf 100644 --- a/lms/static/js/certificates/views/certificate_bulk_whitelist.js +++ b/lms/static/js/certificates/views/certificate_bulk_whitelist.js @@ -31,9 +31,9 @@ return Backbone.View.extend({ el: DOM_SELECTORS.bulk_exception, events: { - 'change #browseBtn': 'chooseFile', + 'change #browseBtn-bulk-csv': 'chooseFile', 'click .upload-csv-button': 'uploadCSV', - 'click a.arrow': 'toggleMessageDetails' + 'click .arrow': 'toggleMessageDetails' }, initialize: function(options){ @@ -138,7 +138,7 @@ $('
', { class: 'message ' + group }).appendTo('.bulk-exception-results').prepend( - " + " + heading + "" + heading ).append($('
% if not section_data['is_self_paced']: -
+
-
-

${_("Student-Generated Certificates")}

- % if section_data['enabled_for_course']: -
- - - -
- % elif section_data['can_enable_for_course']: -
- - - -
- % else: -

${_("You must successfully generate example certificates before you enable student-generated certificates.")}

- - % endif -
+
+

${_("Student-Generated Certificates")}

+ % if section_data['enabled_for_course']: +
+ + + +
+ % elif section_data['can_enable_for_course']: +
+ + + +
+ % else: +

${_("You must successfully generate example certificates before you enable student-generated certificates.")}

+ + % endif +
% endif % if section_data['instructor_generation_enabled'] and not (section_data['enabled_for_course'] and section_data['html_cert_enabled']): -
+
-
-

${_("Generate Certificates")}

-
- % if section_data['html_cert_enabled'] and section_data['active_certificate'] is None: -

${_("Course certificate generation requires an activated web certificate configuration.")}

- - % else: -

- ${_("When you are ready to generate certificates for your course, click Generate Certificates. You do not need to do this if you have set the certificate mode to on-demand generation.")} -

- - %endif -
-
-
+
+

${_("Generate Certificates")}

+
+ % if section_data['html_cert_enabled'] and section_data['active_certificate'] is None: +

${_("Course certificate generation requires an activated web certificate configuration.")}

+ + % else: +

+ ${_("When you are ready to generate certificates for your course, click Generate Certificates. You do not need to do this if you have set the certificate mode to on-demand generation.")} +

+ + %endif +
+
+
%if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'): -
-
-

${_("Pending Tasks")}

-
-

${_("The status for any active tasks appears in a table below.")}

-
-
-
-
+
+
+

${_("Pending Tasks")}

+
+

${_("The status for any active tasks appears in a table below.")}

+
+
+
+
%endif % endif @@ -135,6 +135,7 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str
+

diff --git a/lms/templates/instructor/instructor_dashboard_2/membership.html b/lms/templates/instructor/instructor_dashboard_2/membership.html index eb7336c963..d065cfbffd 100644 --- a/lms/templates/instructor/instructor_dashboard_2/membership.html +++ b/lms/templates/instructor/instructor_dashboard_2/membership.html @@ -92,15 +92,14 @@ from openedx.core.djangoapps.course_groups.partition_scheme import get_cohorted_

${_("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.")}

- - -
- Browse - - + + +
- +