fix: enable teams with content groups connection only if teams is enabled
Description
This PR modifies the connection between Teams with Content Groups to enable only if Teams is enabled.
Currently, when a Course Author decides to disable Teams, the configured restrictions remain on the units and it’s possible to remove/add restrictions. However, as Teams is disabled, the tab in the LMS doesn’t appear, Learners cannot join/leave any teams, and Course Authors cannot manage them either.
For now on, if the Course Author decides to disable Teams all restrictions applied in the units are disabled and the Course Author can't edit them. If the Course Author decides to re-enable Teams the restrictions applied to the units are enabled and the Course Author can edit them.
Supporting information
Testing instructions
-
Create a Tutor environment.
-
Create a mount of edx-platform with the changes in this branch PR.
-
Create a course waffle flag in
{lms_domain}/admin/waffle_utils/waffleflagcourseoverridemodel/- Waffle Flag:
teams.content_groups_for_teams - Course id: [Your Course ID]
- Enabled: ✅
- Waffle Flag:
-
Enables Teams in the platform creating a
teams.enable_teams_appwaffle flag in{lms_domain}/admin/waffle/flag/ -
Activates Teams in your course in Studio > [Your Course] > Content > Pages & Resources > Teams :gear: > ◉ Teams Toggle.
-
Create a few team sets (or groups) from the Course Authoring MFE for your course.
-
Then, go to the LMS > [Your Course] > Teams and create a few teams within those team sets (or groups/topics)
-
As a Student, try loading the sections of the course, you'll be able to load each course section. You'll be able to see them as usual.
-
Now, restrict units for each team as you would with cohorts or enrollment tracks. Studio > Outline > Unit > Configure > Restric access to
-
As a Student, try loading the units again. You won't be able to see any content.
-
As Course Author disable Teams in your course similar to step 5.
-
The Course Author cannot edit unit restrictions by teams, only per cohort and course enrollments.
-
As a Student, you will be able to see the content of the units restricted by teams without any problem.
Deadline
None
Thanks for the pull request, @BryanttV!
This repository is currently maintained by @openedx/wg-maintenance-openedx-platform.
Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.
:radio_button: Get product approval
If you haven't already, check this list to see if your contribution needs to go through the product review process.
- If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
- This process (including the steps you'll need to take) is documented here.
- If it doesn't, simply proceed with the next step.
:radio_button: Provide context
To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
- Dependencies
This PR must be merged before / after / at the same time as ...
- Blockers
This PR is waiting for OEP-1234 to be accepted.
- Timeline information
This PR must be merged by XX date because ...
- Partner information
This is for a course on edx.org.
- Supporting documentation
- Relevant Open edX discussion forum threads
:radio_button: Get a green build
If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.
Where can I find more information?
If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
When can I expect my changes to be merged?
Our goal is to get community contributions seen and reviewed as efficiently as possible.
However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
- The size and impact of the changes that it introduces
- The need for product review
- Maintenance status of the parent repository
:bulb: As a result it may take up to several weeks or months to complete a review and merge your PR.
Hi @mariajgrimaldi, could you check this PR, please?
@BryanttV @mariajgrimaldi hi there! Is this pull request still in progress?
@BryanttV @mariajgrimaldi hi there! Is this pull request still in progress?
Gentle ping on this @BryanttV @mariajgrimaldi
@BryanttV if this is still something you're working on, would you mind moving it to a draft? Or can we close it for now?
@BryanttV @mariajgrimaldi hi there! Is this still in progress?
Friendly ping on this, @BryanttV
Hi @BryanttV @mariajgrimaldi! This has been stalled for a bit. Ok to close?
Hi @mphilbrick211, this PR is ready for review. Sorry for the delay. @mariajgrimaldi, could you please take a look?