diff --git a/lms/djangoapps/shoppingcart/tests/test_models.py b/lms/djangoapps/shoppingcart/tests/test_models.py index b368837b14..37b73ae506 100644 --- a/lms/djangoapps/shoppingcart/tests/test_models.py +++ b/lms/djangoapps/shoppingcart/tests/test_models.py @@ -18,6 +18,7 @@ from xmodule.modulestore.tests.factories import CourseFactory from courseware.tests.tests import TEST_DATA_MONGO_MODULESTORE from shoppingcart.models import (Order, OrderItem, CertificateItem, InvalidCartItem, PaidCourseRegistration, OrderItemSubclassPK, PaidCourseRegistrationAnnotation) +from shoppingcart.views import initialize_report, REPORT_TYPES from shoppingcart.reports import ItemizedPurchaseReport, CertificateStatusReport, UniversityRevenueShareReport, RefundReport from student.tests.factories import UserFactory from student.models import CourseEnrollment @@ -26,22 +27,6 @@ from shoppingcart.exceptions import PurchasedCallbackException, ReportTypeDoesNo import pytz import datetime -REPORT_TYPES = [ - ("refund_report", RefundReport), - ("itemized_purchase_report", ItemizedPurchaseReport), - ("university_revenue_share", UniversityRevenueShareReport), - ("certificate_status", CertificateStatusReport), -] - - -def initialize_report(report_type): - """ - Creates the appropriate type of Report object based on the string report_type. - """ - for item in REPORT_TYPES: - if report_type in item: - return item[1]() - raise ReportTypeDoesNotExistException @override_settings(MODULESTORE=TEST_DATA_MONGO_MODULESTORE) class OrderTest(ModuleStoreTestCase): diff --git a/lms/djangoapps/shoppingcart/tests/test_reports.py b/lms/djangoapps/shoppingcart/tests/test_reports.py index e5312ec594..3b80ba61ec 100644 --- a/lms/djangoapps/shoppingcart/tests/test_reports.py +++ b/lms/djangoapps/shoppingcart/tests/test_reports.py @@ -14,17 +14,10 @@ from shoppingcart.reports import ItemizedPurchaseReport, CertificateStatusReport from student.tests.factories import UserFactory from student.models import CourseEnrollment from course_modes.models import CourseMode -from shoppingcart.views import initialize_report +from shoppingcart.views import initialize_report, REPORT_TYPES import pytz import datetime -REPORT_TYPES = [ - ("refund_report", RefundReport), - ("itemized_purchase_report", ItemizedPurchaseReport), - ("university_revenue_share", UniversityRevenueShareReport), - ("certificate_status", CertificateStatusReport), -] - @override_settings(MODULESTORE=TEST_DATA_MONGO_MODULESTORE) class ReportTypeTests(ModuleStoreTestCase): diff --git a/lms/templates/shoppingcart/download_report.html b/lms/templates/shoppingcart/download_report.html index 9dc5548895..e6fda982b2 100644 --- a/lms/templates/shoppingcart/download_report.html +++ b/lms/templates/shoppingcart/download_report.html @@ -19,19 +19,24 @@ % endif
+

${_("These reports are delimited by start and end dates.")}

+
+ +
+ + +

+

${_("These reports are delimited alphabetically by university name. i.e., generating a report with 'Start Letter' A and 'End Letter' C will generate reports for all universities starting with A, B, and C.")}

-
- -
- +