From 33396224466c82ca018f0540b482f83ab8829b7d Mon Sep 17 00:00:00 2001 From: Mohammad Ahtasham ul Hassan Date: Thu, 8 Aug 2024 19:48:51 +0500 Subject: [PATCH] fix: fixes --- ...merce-coordinator-code-out-of-platform.rst | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/decisions/0008-pull-commerce-coordinator-code-out-of-platform.rst b/docs/decisions/0008-pull-commerce-coordinator-code-out-of-platform.rst index 7e5cebd0b..9ae770d25 100644 --- a/docs/decisions/0008-pull-commerce-coordinator-code-out-of-platform.rst +++ b/docs/decisions/0008-pull-commerce-coordinator-code-out-of-platform.rst @@ -9,20 +9,21 @@ Status Context ******* -Kyle from Axim marked Commerce Coordinator related code in edx-platform as `business-related`. For Reference see `PR`_ +Kyle from Axim marked Commerce Coordinator related code in edx-platform as ``business-related``. For Reference see `PR`_ .. _PR: https://github.com/openedx/edx-platform/pull/35203 -As a result of this, we need to pull out all the references of `commerce-coordinator` from `edx-platform` while also finding a way to override the `edx-platform` code from our tooling to ensure that `commerce-coordinator` functionality remains intact. +As a result of this, we need to pull out all the references of ``commerce-coordinator`` from ``edx-platform`` while also finding a way to override the ``edx-platform`` code from our tooling to ensure that ``commerce-coordinator`` functionality remains intact. Decision ******** -We have decided to use `Django App Plugins`_ from `edx_django_utils`_ to override the `EcommerceService().payment_page_url`_ and `lms.djangoapps.commerce.util.refund_seat`_ functions/methods in `edx-platform` in which currently we have implemented commerce-coordinator specific code. `Django App Plugins`_ provide us with a way to override the application code without modifying the original codebase. -Specifically we will be using the `pluggable_overrides`_ utility which is designed to override any method/function to point to an alternative implementation. -As a result of this we will be able to pull out the `commerce-coordinator` related code from `edx-platform` into a private pluggable application and still be able to use the functionality provided by `commerce-coordinator`. +We have decided to use `Django App Plugins`_ from `edx_django_utils`_ to override the `EcommerceService().payment_page_url`_ and `lms.djangoapps.commerce.util.refund_seat`_ functions/methods in ``edx-platform`` in which currently we have implemented ``commerce-coordinator`` specific code. -For the implementation, we will be creating a new pluggable application that will house all the business specific `commerce-coordinator` related code in overridden functions. This new pluggable application will be installed with `EDXAPP_PRIVATE_REQUIREMENTS`_ from `edx-internal`_. +`Django App Plugins`_ provide us with a way to override the application code without modifying the original codebase. Specifically we will be using the `pluggable_overrides`_ utility which is designed to override any method/function to point to an alternative implementation. +As a result of this we will be able to pull out the ``commerce-coordinator`` related code from ``edx-platform`` into a private pluggable application and still be able to use the functionality provided by ``commerce-coordinator``. + +For the implementation, we will be creating a new pluggable application that will house all the business specific ``commerce-coordinator`` related code in overridden functions. This new pluggable application will be installed with `EDXAPP_PRIVATE_REQUIREMENTS`_ from `edx-internal`_. .. _Django App Plugins: https://github.com/openedx/edx-django-utils/tree/master/edx_django_utils/plugins#django-app-plugins .. _edx_django_utils: https://github.com/openedx/edx-django-utils @@ -35,16 +36,16 @@ For the implementation, we will be creating a new pluggable application that wil Rejected Alternatives ********************* -A lengthy R&D was undertaken to look at several options for pulling out the commerce coordinator related code from `edx-platform`. +A lengthy R&D was undertaken to look at several options for pulling out the commerce coordinator related code from ``edx-platform``. Alternatives that were investigated and rejected: - Using EduNext's Ecommerce extension - Rejected due to: - The extension solely deals with adding more payment gateways to the ecommerce ecosystem. - - The extension does not provide a way to override the existing code blocks in `edx-platform`. + - The extension does not provide a way to override the existing code blocks in ``edx-platform``. - The extension is not actively maintained. - Generic Flag names in edx-platform - Rejected due to: - This approach is not scalable. - - This approach will not provide a way to override the existing code blocks in `edx-platform`. + - This approach will not provide a way to override the existing code blocks in ``edx-platform``.