diff --git a/README.md b/README.md index a5562bb..bb773d5 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ This plugin works with some docker images. These are defined by default if you have different images that aren't based on these, you can have some problems. ```yaml -DOCKER_IMAGE_OPENEDX: "docker.io/ednxops/distro-edunext-edxapp:mango" -DOCKER_IMAGE_OPENEDX_DEV: "docker.io/ednxops/distro-edunext-edxapp-dev:mango" +DOCKER_IMAGE_OPENEDX: "docker.io/ednxops/distro-edunext-edxapp:nuez" +DOCKER_IMAGE_OPENEDX_DEV: "docker.io/ednxops/distro-edunext-edxapp-dev:nuez" ``` Also, you need an edx-platform version distro compatible. @@ -40,12 +40,13 @@ Also, you need an edx-platform version distro compatible. | ------- | -------- | ----- | | lilac | limonero | v12 | | maple | mango | v13 | +| nutmeg | nuez | v14 | You can find distro releases on https://github.com/edunext/edunext-platform. ```yaml EDX_PLATFORM_REPOSITORY: "https://github.com/eduNEXT/edunext-platform.git" -EDX_PLATFORM_VERSION: "ednx-release/mango.master" +EDX_PLATFORM_VERSION: "ednx-release/nuez.master" ``` # Packages @@ -61,6 +62,7 @@ These packages will be installed in a default installation. - eox-audit-model (DISTRO_EOX_AUDIT_MODEL_DPKG) - eox-tagging (DISTRO_EOX_TAGGING_DPKG) + ## How to add a new package In your config.yml you can set any package following this structure: @@ -137,6 +139,7 @@ These themes will be installed in a default installation. - [bragi](https://github.com/eduNEXT/ednx-saas-themes/tree/edunext/mango.master) + ## How to add a theme You can override the default themes on the config.yml but @@ -218,6 +221,16 @@ DISTRO_EXTRA_MIDDLEWARES: - middleware.test.2 ``` +## How disable MFE + +You can disable MFE default redirections and use the legacy frontend in nuez release adding in config.yml: + +```yaml +DISTRO_DISABLE_MFE: true +``` + +Remember don't install tutor-mfe. + # License This software is licensed under the terms of the AGPLv3. diff --git a/setup.cfg b/setup.cfg index dabad90..7dd5158 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.3.0 +current_version = 3.0.0-rc1 commit = True tag = True diff --git a/setup.py b/setup.py index e55f3d6..8fc6c04 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ def load_about(): packages=find_packages(exclude=["tests*"]), include_package_data=True, python_requires=">=3.6", - install_requires=["tutor>=13.0.0, <14", "click"], + install_requires=["tutor>=14.0.5, <15", "click"], extras_require={ "test": ["behave", "pytest", "pylint"] }, diff --git a/tests/test_distro.py b/tests/test_distro.py index 86e9fe0..1ba4298 100644 --- a/tests/test_distro.py +++ b/tests/test_distro.py @@ -9,4 +9,4 @@ def test_version(): """ Tutor distro plugin tests version """ - assert __version__ == '0.1.0' + assert __version__ == '3.0.0-rc1' diff --git a/tutordistro/__about__.py b/tutordistro/__about__.py index 55e4709..528787c 100644 --- a/tutordistro/__about__.py +++ b/tutordistro/__about__.py @@ -1 +1 @@ -__version__ = "2.3.0" +__version__ = "3.0.0" diff --git a/tutordistro/patches/cms-env b/tutordistro/patches/cms-env index 6de6827..8935924 100644 --- a/tutordistro/patches/cms-env +++ b/tutordistro/patches/cms-env @@ -1,2 +1,2 @@ -"USE_EOX_TENANT": true, -"DEFAULT_SITE_THEME": "bragi" +USE_EOX_TENANT: True +DEFAULT_SITE_THEME: "bragi" diff --git a/tutordistro/patches/lms-env b/tutordistro/patches/lms-env index 1c10c26..5cd310c 100644 --- a/tutordistro/patches/lms-env +++ b/tutordistro/patches/lms-env @@ -1,4 +1,4 @@ -"USE_EOX_TENANT": true, -"DEFAULT_SITE_THEME": "bragi", -"ENABLE_EOX_THEMING_DERIVE_WORKAROUND": true, -"SESSION_COOKIE_DOMAIN": ".{{ LMS_HOST|common_domain(CMS_HOST) }}" +USE_EOX_TENANT: True +DEFAULT_SITE_THEME: "bragi" +ENABLE_EOX_THEMING_DERIVE_WORKAROUND: True +SESSION_COOKIE_DOMAIN: ".{{ LMS_HOST|common_domain(CMS_HOST) }}" diff --git a/tutordistro/plugin.py b/tutordistro/plugin.py index 0ad391b..22d560a 100644 --- a/tutordistro/plugin.py +++ b/tutordistro/plugin.py @@ -17,11 +17,11 @@ "VERSION": __version__, "EXTRA_MIDDLEWARES": [], # DISTRO PACKAGES - "EOX_CORE_DPKG": { + "EOX_CORE_DPKG": { "index": "git", "name": "eox-core", "repo": "eox-core", - "version": "v6.1.0", + "version": "v7.0.0", "domain": "github.com", "protocol": "https", "path": "eduNEXT", @@ -53,7 +53,7 @@ "index": "git", "name": "eox-tenant", "repo": "eox-tenant", - "version": "v6.0.0", + "version": "v6.0.1", "domain": "github.com", "protocol": "https", "path": "eduNEXT", @@ -75,19 +75,13 @@ "index": "git", "name": "eox-theming", "repo": "eox-theming", - "version": "v3.1.0", + "version": "v4.0.1", "domain": "github.com", "protocol": "https", "path": "eduNEXT", "variables": { - "development": { - "GET_BRANDING_API": "eox_tenant.edxapp_wrapper.backends" - ".branding_api_l_v1", - }, - "production": { - "GET_BRANDING_API": "eox_tenant.edxapp_wrapper.backends" - ".branding_api_l_v1", - }, + "development": {}, + "production": {}, }, "EOX_THEMING_CONFIG_SOURCES":[ "from_eox_tenant_microsite_v2", @@ -95,68 +89,46 @@ ], "private": False, }, - "EOX_AUDIT_MODEL_DPKG": { + "EOX_HOOKS_DPKG": { "index": "git", - "name": "eox-audit-model", - "repo": "eox-audit-model", - "version": "v0.7.3", + "name": "eox-hooks", + "repo": "eox-hooks", + "version": "v3.0.0", "domain": "github.com", "protocol": "https", "path": "eduNEXT", "variables": { - "development": { - }, - "production": { - }, + "development": {}, + "production": {}, }, "private": False, }, - "EOX_HOOKS_DPKG": { + "EOX_TAGGING_DPKG": { "index": "git", - "name": "eox-hooks", - "repo": "eox-hooks", - "version": "v2.0.1", + "name": "eox-tagging", + "repo": "eox-tagging", + "version": "v5.0.0", "domain": "github.com", "protocol": "https", "path": "eduNEXT", "variables": { - "development": { - "EOX_HOOKS_ENROLLMENTS_BACKEND": "eox_hooks.edxapp_wrapper.backends" - ".enrollments_l_v1", - "EOX_HOOKS_COURSES_BACKEND": "eox_hooks.edxapp_wrapper.backends.courses_l_v1", - "EOX_HOOKS_COURSE_MODES_BACKEND": "eox_hooks.edxapp_wrapper.backends" - ".course_modes_l_v1", - "EOX_HOOKS_MODELS_BACKEND": "eox_hooks.edxapp_wrapper.backends.models_l_v1", - }, - "production": { - "EOX_HOOKS_ENROLLMENTS_BACKEND": "eox_hooks.edxapp_wrapper.backends" - ".enrollments_l_v1", - "EOX_HOOKS_COURSES_BACKEND": "eox_hooks.edxapp_wrapper.backends.courses_l_v1", - "EOX_HOOKS_COURSE_MODES_BACKEND": "eox_hooks.edxapp_wrapper.backends" - ".course_modes_l_v1", - "EOX_HOOKS_MODELS_BACKEND": "eox_hooks.edxapp_wrapper.backends.models_l_v1", - }, + "development": {}, + "production": {}, }, "private": False, }, - "EOX_TAGGING_DPKG": { + "EOX_AUDIT_MODEL_DPKG": { "index": "git", - "name": "eox-tagging", - "repo": "eox-tagging", - "version": "v4.0.0", + "name": "eox-audit-model", + "repo": "eox-audit-model", + "version": "v1.0.0", "domain": "github.com", "protocol": "https", "path": "eduNEXT", "variables": { "development": { - "EOX_TAGGING_GET_ENROLLMENT_OBJECT": "eox_tagging" - ".edxapp_wrappers" - ".backends.enrollment_l_v1", }, "production": { - "EOX_TAGGING_GET_ENROLLMENT_OBJECT": "eox_tagging" - ".edxapp_wrappers" - ".backends.enrollment_l_v1", }, }, "private": False, @@ -164,7 +136,6 @@ "THEMES_ROOT": "/openedx/themes", "THEME_DIRS": [ "/openedx/themes/ednx-saas-themes/edx-platform", - "/openedx/themes/ednx-saas-themes/edx-platform/bragi-children", "/openedx/themes/ednx-saas-themes/edx-platform/bragi-generator", ], "THEMES_NAME": [ @@ -174,26 +145,32 @@ { "name": "ednx-saas-themes", "repo": "ednx-saas-themes", - "version": "edunext/mango.master", + "version": "edunext/nuez.master", "domain": "github.com", "protocol": "ssh", "path": "eduNEXT", }, ], "INSTALL_EDNX_REQUIREMENTS": False, + "DISABLE_MFE": False }, "unique": {}, "overrides": { - "DOCKER_IMAGE_OPENEDX": "docker.io/ednxops/distro-edunext-edxapp:mango", - "DOCKER_IMAGE_OPENEDX_DEV": "docker.io/ednxops/distro-edunext-edxapp-dev:mango", + "DOCKER_IMAGE_OPENEDX": "docker.io/ednxops/distro-edunext-edxapp:nuez", + "DOCKER_IMAGE_OPENEDX_DEV": "docker.io/ednxops/distro-edunext-edxapp-dev:nuez", "EDX_PLATFORM_REPOSITORY": "https://github.com/eduNEXT/edunext-platform.git", - "EDX_PLATFORM_VERSION": "ednx-release/mango.master", + "EDX_PLATFORM_VERSION": "ednx-release/nuez.master", }, } ################# Initialization tasks # To run the script from templates/distro/tasks/myservice/init, add: - +hooks.Filters.COMMANDS_INIT.add_item( + ( + "lms", + ("distro", "tasks", "lms", "init"), + ) +) # Plugin templates hooks.Filters.ENV_TEMPLATE_ROOTS.add_item( diff --git a/tutordistro/templates/distro/tasks/lms/init b/tutordistro/templates/distro/tasks/lms/init new file mode 100644 index 0000000..c3c0608 --- /dev/null +++ b/tutordistro/templates/distro/tasks/lms/init @@ -0,0 +1,8 @@ +{% if DISTRO_DISABLE_MFE %} +(./manage.py lms waffle_flag --list | grep course_home.course_home_use_legacy_frontend) || ./manage.py lms waffle_flag --create --everyone course_home.course_home_use_legacy_frontend +(./manage.py lms waffle_flag --list | grep courseware.use_legacy_frontend) || ./manage.py lms waffle_flag --create --everyone courseware.use_legacy_frontend + +{% else %} +./manage.py lms waffle_delete --flags course_home.course_home_use_legacy_frontend +./manage.py lms waffle_delete --flags courseware.use_legacy_frontend +{% endif %} diff --git a/tutordistro/templates/distro/tasks/lms/pre-init b/tutordistro/templates/distro/tasks/lms/pre-init index ada177f..802f1a1 100644 --- a/tutordistro/templates/distro/tasks/lms/pre-init +++ b/tutordistro/templates/distro/tasks/lms/pre-init @@ -1,5 +1,5 @@ ./manage.py lms migrate contenttypes -./manage.py lms migrate eox_tenant ./manage.py lms migrate eox_core +./manage.py lms migrate eox_tenant ./manage.py lms migrate eox_tagging ./manage.py lms migrate eox_audit_model