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

[ENT-5039] - Moodle - Inactivate courses instead of true delete #1881

Merged
merged 9 commits into from
Oct 4, 2023

Conversation

hamzawaleed01
Copy link
Member

@hamzawaleed01 hamzawaleed01 commented Sep 22, 2023

Ticket: ENT-5039

Merge checklist:

  • Any new requirements are in the right place (do not manually modify the requirements/*.txt files)
    • base.in if needed in production but edx-platform doesn't install it
    • test-master.in if edx-platform pins it, with a matching version
    • make upgrade && make requirements have been run to regenerate requirements
  • make static has been run to update webpack bundling if any static content was updated
  • ./manage.py makemigrations has been run
    • Checkout the Database Migration Confluence page for helpful tips on creating migrations.
    • Note: This must be run if you modified any models.
      • It may or may not make a migration depending on exactly what you modified, but it should still be run.
    • This should be run from either a venv with all the lms/edx-enterprise requirements installed or if you checked out edx-enterprise into the src directory used by lms, you can run this command through an lms shell.
      • It would be ./manage.py lms makemigrations in the shell.
  • Version bumped
  • Changelog record added
  • Translations updated (see docs/internationalization.rst but also this isn't blocking for merge atm)

Post merge:

  • Tag pushed and a new version released
    • Note: Assets will be added automatically. You just need to provide a tag (should match your version number) and title and description.
  • After versioned build finishes in GitHub Actions, verify version has been pushed to PyPI
    • Each step in the release build has a condition flag that checks if the rest of the steps are done and if so will deploy to PyPi.
      (so basically once your build finishes, after maybe a minute you should see the new version in PyPi automatically (on refresh))
  • PR created in edx-platform to upgrade dependencies (including edx-enterprise)
    • This must be done after the version is visible in PyPi as make upgrade in edx-platform will look for the latest version in PyPi.
    • Note: the edx-enterprise constraint in edx-platform must also be bumped to the latest version in PyPi.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Sep 22, 2023
@openedx-webhooks
Copy link

Thanks for the pull request, @hamzawaleed01! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

⚠️ We can't start reviewing your pull request until you've submitted a signed contributor agreement or indicated your institutional affiliation. Please see the CONTRIBUTING file for more information. If you've signed an agreement in the past, you may need to re-sign. See The New Home of the Open edX Codebase for details.

Once you've signed the CLA, please allow 1 business day for it to be processed. After this time, you can re-run the CLA check by adding a comment here that you have signed it. If the problem persists, you can tag the @openedx/cla-problems team in a comment on your PR for further assistance.

integrated_channels/moodle/client.py Outdated Show resolved Hide resolved
integrated_channels/moodle/client.py Outdated Show resolved Hide resolved
integrated_channels/moodle/client.py Outdated Show resolved Hide resolved
integrated_channels/moodle/client.py Outdated Show resolved Hide resolved
integrated_channels/moodle/client.py Show resolved Hide resolved
integrated_channels/moodle/client.py Outdated Show resolved Hide resolved
integrated_channels/moodle/client.py Outdated Show resolved Hide resolved
integrated_channels/moodle/client.py Outdated Show resolved Hide resolved
@hamzawaleed01 hamzawaleed01 force-pushed the hamza/ENT-5039 branch 3 times, most recently from 8532f6f to 403ff13 Compare September 22, 2023 12:18
@hamzawaleed01
Copy link
Member Author

@johnnagro @alex-sheehan-edx need your review on this one 🧠

@hamzawaleed01 hamzawaleed01 force-pushed the hamza/ENT-5039 branch 2 times, most recently from 3f73dee to 1b89a54 Compare September 22, 2023 13:10
Copy link
Contributor

@alex-sheehan-edx alex-sheehan-edx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had one thought about overall approach but it's more of a thought/exploration/improvement. Your code follows the pattern established and I believe gets the job done 👍

integrated_channels/moodle/client.py Outdated Show resolved Hide resolved
integrated_channels/moodle/client.py Outdated Show resolved Hide resolved
@alex-sheehan-edx
Copy link
Contributor

ofc don't forget the premerge checklist before you merge 👍

@hamzawaleed01 hamzawaleed01 changed the title Moodle - Inactivate courses instead of true delete [ENT-5039] - Moodle - Inactivate courses instead of true delete Sep 28, 2023
Copy link
Contributor

@alex-sheehan-edx alex-sheehan-edx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great 😄

integrated_channels/moodle/client.py Show resolved Hide resolved
integrated_channels/moodle/exporters/content_metadata.py Outdated Show resolved Hide resolved
'courseids[]': moodle_course_id
}
response = self._wrapped_post(params)
serialized_data['wsfunction'] = 'core_course_update_courses'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while I think it's possible for us to shove this into say the prepare_items_For_transmission or the prepare items for delete methods, I don't think it's worth the effort. Good as is! 👍

Copy link
Member

@NawfalAhmed NawfalAhmed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

welcome to EDX 😄

@hamzawaleed01 hamzawaleed01 merged commit 1a307c7 into master Oct 4, 2023
7 checks passed
@hamzawaleed01 hamzawaleed01 deleted the hamza/ENT-5039 branch October 4, 2023 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants