diff --git a/cms/models.py b/cms/models.py index bcb2ea9041..67d2fca5d1 100644 --- a/cms/models.py +++ b/cms/models.py @@ -1109,18 +1109,6 @@ def get_url_parts(self, request=None): ), ) - @property - def get_current_finaid(self): - """ - Returns information about financial aid for the current learner. - - If the learner has a flexible pricing(financial aid) request that's - approved, this should return the learner's adjusted price. If they - don't, this should return the Page for the applicable request form. - If they're not logged in, this should return None. - """ - raise NotImplementedError - def get_context(self, request, *args, **kwargs): # noqa: ARG002 instructors = [ member.linked_instructor_page @@ -1165,7 +1153,7 @@ def product(self): """Gets the product associated with this page""" return self.course - def get_current_finaid(self, request): + def _get_current_finaid(self, request): """ Returns information about financial aid for the current learner. @@ -1216,7 +1204,7 @@ def get_context(self, request, *args, **kwargs): and relevant_run is not None and (relevant_run.is_in_progress or request.user.is_editor) ) - finaid_price = self.get_current_finaid(request) + finaid_price = self._get_current_finaid(request) product = ( relevant_run.products.filter(is_active=True).first() if relevant_run diff --git a/cms/models_test.py b/cms/models_test.py index 8b1c565aea..11abe9a5d6 100644 --- a/cms/models_test.py +++ b/cms/models_test.py @@ -618,28 +618,6 @@ def test_courseware_title_synced_with_product_page_title(test_course): assert courseware.title == updated_title -def test_get_current_finaid_with_flex_price_for_expired_course_run(mocker): - """ - Tests that get_current_finaid returns None for a user approved for - financial aid on a course with only expired course runs. - """ - now = now_in_utc() - course_run = CourseRunFactory.create(enrollment_end=now - timedelta(days=10)) - ProductFactory.create(purchasable_object=course_run) - rf = RequestFactory() - request = rf.get("/") - request.user = UserFactory.create() - patched_flexible_price_approved = mocker.patch( - "flexiblepricing.api.is_courseware_flexible_price_approved" - ) - patched_flexible_price_discount = mocker.patch( - "flexiblepricing.api.determine_courseware_flexible_price_discount" - ) - assert course_run.course.page.get_current_finaid(request) is None - patched_flexible_price_discount.assert_not_called() - patched_flexible_price_approved.assert_not_called() - - @pytest.mark.parametrize("flex_form_for_course", [True, False]) def test_flexible_pricing_request_form_context(flex_form_for_course): """ diff --git a/cms/templates/product_page.html b/cms/templates/product_page.html index 81d9a9bac5..b23e3de7ee 100644 --- a/cms/templates/product_page.html +++ b/cms/templates/product_page.html @@ -9,8 +9,8 @@ {% block seohead %} {% meta_tags page %} - {% if page.thumbnail_image %} - + {% if page.feature_image %} + {% endif %} {% endblock %} @@ -129,7 +129,7 @@