Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test grading method feature flag 2 #969

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

brian-smith-tcril
Copy link
Contributor

Testing PR to get a sandbox up for

Changes from the PR branches:

  • Checked in the dist directory in frontend-lib-content-components
  • Updated the package.json and package-lock.json in frontend-app-course-authoring to point to my branch of frontend-lib-content-components
  • Rebased both on latest (problem editor wouldn't load without the rebase)

In order to test this locally without needing to bind-mount I I manually set the waffle flags in admin and used the following tutor plugin

from tutormfe.hooks import MFE_APPS
from tutor import hooks

@MFE_APPS.add()
def _add_my_mfe(mfes):
    mfes["course-authoring"] = {
        "repository": "https://github.com/brian-smith-tcril/frontend-app-course-authoring.git",
        "port": 2001,
        "version": "test-grading-method-feature-flag", # optional, will default to the Open edX current tag.
    }
    return mfes

hooks.Filters.ENV_PATCHES.add_items(
    [
        (
            "mfe-lms-common-settings",
            """
MFE_CONFIG["ENABLE_GRADING_METHOD_IN_PROBLEMS"] = True
"""
        )
    ]
)

Settings

TUTOR_GROVE_MFE_LMS_COMMON_SETTINGS: |
  MFE_CONFIG["ENABLE_GRADING_METHOD_IN_PROBLEMS"] = True

@brian-smith-tcril brian-smith-tcril added the create-sandbox open-craft-grove should create a sandbox environment from this PR label Apr 29, 2024
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@brian-smith-tcril
Copy link
Contributor Author

Note: I manually set the new_core_editors.use_new_problem_editor and new_core_editors.use_new_text_editor waffle flags in django admin for this sandbox.

@BryanttV
Copy link
Contributor

BryanttV commented May 3, 2024

Hi @brian-smith-tcril, I just realized that the feature flag still needs to be activated on the backend side. You could edit the plugin above and add the feature flag:

hooks.Filters.ENV_PATCHES.add_items(
    [
        (
            "mfe-lms-common-settings",
            "MFE_CONFIG['ENABLE_GRADING_METHOD_IN_PROBLEMS'] = True",
        ),
        (
            "openedx-common-settings",
            "FEATURES['ENABLE_GRADING_METHOD_IN_PROBLEMS'] = True",
        ),
    ]
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-sandbox open-craft-grove should create a sandbox environment from this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants