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

Create flag to disable Discussions configuration #383

Closed
Tracked by #67
arbrandes opened this issue Nov 8, 2022 · 6 comments
Closed
Tracked by #67

Create flag to disable Discussions configuration #383

arbrandes opened this issue Nov 8, 2022 · 6 comments
Assignees
Milestone

Comments

@arbrandes
Copy link
Contributor

In order to include course-authoring in the next release and still have the Pages & Resources feature, we need a way to disable the frontend-app-discussions configuration.

@ghassanmas
Copy link
Member

assign me

@jristau1984
Copy link
Contributor

@asadazam93 should be in the conversation here, as there are already several flags related to Discussions.

@ghassanmas
Copy link
Member

@arbrandes @asadazam93 are there flags beside those

discussions.enable_learners_stats lms/djangoapps/discussion/config/waffle.py#L9

discussions.enable_reported_content_email_notifications lms/djangoapps/discussion/toggles.py#L38

listed in openedx/wg-build-test-release/issues/204 Other flags are related is discussions.pages_and_resources_mfe which is needed so that studio redirect to the mfe.

So this how it looks like

image

I assume we want it to look like this:

image

If we hide people might still be accessing it via the url i.e https://apps.olive.zaat.dev/authoring/course/course-v1:zaatdev+101+1/pages-and-resources/discussion/settings

So do we need to hide it and disbale the route or only hiding it is enough?

In terms of how to implement it, if we just hide it we can probably just add a css/sass role, or through the API, I beleive these boxes are coming from the api:

https://studio.olive.zaat.dev/api/course_apps/v1/apps/course-v1:zaatdev+101+1

Of which its response is

[
    {
        "id": "calculator",
        "enabled": false,
        "name": "Calculator",
        "description": "Provide an in-course calculator for simple and complex calculations.",
        "allowed_operations": {
            "enable": true,
            "configure": false
        },
        "documentation_links": {
            "learn_more_configuration": "https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/latest/exercises_tools/calculator.html"
        }
    },
    {
        "id": "custom_pages",
        "enabled": false,
        "name": "Custom pages",
        "description": "Provide additional course content and resources with custom pages",
        "allowed_operations": {
            "enable": false,
            "configure": true
        },
        "documentation_links": {
            "learn_more_configuration": "https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/latest/course_assets/pages.html#adding-custom-pages"
        },
        "legacy_link": "https://studio.olive.zaat.dev/tabs/course-v1:zaatdev+101+1"
    },
    {
        "id": "discussion",
        "enabled": true,
        "name": "Discussion",
        "description": "Encourage participation and engagement in your course with discussions.",
        "allowed_operations": {
            "enable": true,
            "configure": true
        },
        "documentation_links": {
            "learn_more_configuration": "https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/latest/course_components/create_discussion.html"
        }
    },
    {
        "id": "progress",
        "enabled": true,
        "name": "Progress",
        "description": "Keep learners engaged and on track throughout the course.",
        "allowed_operations": {
            "enable": true,
            "configure": true
        },
        "documentation_links": {
            "learn_more_configuration": "https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/latest/course_assets/pages.html?highlight=progress#hiding-or-showing-the-wiki-or-progress-pages"
        }
    },
    {
        "id": "textbooks",
        "enabled": false,
        "name": "Textbooks",
        "description": "Create and manage a library of course readings, textbooks, and chapters.",
        "allowed_operations": {
            "enable": false,
            "configure": true
        },
        "documentation_links": {
            "learn_more_configuration": "https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/latest/course_assets/textbooks.html"
        },
        "legacy_link": "https://studio.olive.zaat.dev/textbooks/course-v1:zaatdev+101+1"
    },
    {
        "id": "wiki",
        "enabled": false,
        "name": "Wiki",
        "description": "Enable learners to access, and collaborate on course-related information.",
        "allowed_operations": {
            "enable": true,
            "configure": true
        },
        "documentation_links": {
            "learn_more_configuration": "https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/latest/course_assets/course_wiki.html"
        }
    }
]

So if we remove the discussion tab then we could change the CMS not affectring the this MFE, but this would probably lead to the route exists. May be there is already a config that disbale that tab?

@asadazam93
Copy link
Contributor

asadazam93 commented Nov 8, 2022

@arbrandes / @ghassanmas I am trying to understand the requirement here. Why do you want to remove the discussions tab from the course authoring MFE? The discussions settings are not specific for the new discussions MFE. Those settings are also applicable for the old legacy discussions, we just moved out the discussion settings from advanced settings and put them in the discussions card in the course authoring MFE. Configuring discussions via course authoring does not mean that it would be configured for the new discussions MFE.

@asadazam93
Copy link
Contributor

asadazam93 commented Nov 8, 2022

Enabling discussions.pages_and_resources_mfe flag links the pages and resources drop down link in studio to the course authoring MFE and it also hides all of the settings available in the course authoring MFE (including discussion settings) from studio. Discussions would still use the old legacy experience but only the settings will be configurable via course authoring MFE.

@arbrandes
Copy link
Contributor Author

@asadazam93, @ghassanmas

Those settings are also applicable for the old legacy discussions

That clears things up a whole lot, thanks! We'd been under the impression the settings were exclusive to the new discussions MFE.

To be clear, that makes this issue moot. The point was to make this MFE usable in Olive without having to bring in frontend-app-discussions, which we can evidently do. Thanks all (in particular @ghassanmas) for the input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

No branches or pull requests

4 participants