Skip to content

Commit 59a0227

Browse files
Muhammad Faraz  MaqsoodMuhammad Faraz  Maqsood
authored andcommitted
feat: call python methods from forum v2
- directly call python native APIs from forum v2 for pin, unpin thread, commentables count_stats and get user's data by user_id - add forum to the edx-platform requirements feat: migrate some APIs to native python - directly call python native APIs from forum v2 for get parent comment, create parent comment and create child comment. - rename retrieve_commentables_stats method to get_commentables_stats and retrieve_user to get_user. feat: pass params to python native APIs - refactored code and now pass proper parameters to python native APIs instead of a single dict feat: code refactor and migrate delete comment API fix: user tests feat: fix tests for get_user API - get_user API tests are now passing in test_views.py and test_serializers.py - add get_user api patch in all tests - fix httppretty request count in some tests - fix test_patch_read_non_owner_user test feat: use new coursewaffle flag to run old code - add `ENABLE_FORUM_V2` course waffle flag to switch between old code i.e. cs_comment_service and new code i.e. forum v2. - mock course waffle flag is_enabled method i.e. ENABLE_FORUM_V2.is_enabled(), so that old unit tests can be run and passed. - refactor code(that parts of code whose native APIs are implemented till now) where we call the native APIs feat: Upgrade Python dependency edx-enterprise adds logging to debug SAP transmitter Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` docs: upstream block ADR, take 2 (openedx#35421) feat: return publishing information on get component endpoint [FC-0062] (openedx#35476) * feat: return publishing information on get component endpoint * feat: read data from component.versioning.draft * test: update tests * chore: update openedx-learning --------- Co-authored-by: Jillian <jill@opencraft.com> Co-authored-by: Chris Chávez <xnpiochv@gmail.com> feat: Add collection tags to index [FC-0062] (openedx#35483) * feat: Add collection tags to index * feat: Add api functions to update tags in collections * feat: Update tags on index when tag_object feat: add idv events to api (openedx#35468) * feat: add idv events to api - moved what was in signals.py to a handlers.py (which is what their file should have been called) * chore: quality * fix: rename test file + imports * fix: change handler reverse url in other tests * fix: refactor signals and handlers pattern - following OEP-49 pattern for signals directory - user removed as param for update function - event now emitted after save * fix: unpin edx-name-affirmation * chore: add init to signals dir * fix: compile requirements * chore: quality * chore: fix some imports * chore: quality * test: added signal emissions to test_api * chore: lint feat: upgrading list_instructor_tasks to DRF ( 10th ) (openedx#35332) * feat: upgrading simple api to drf compatible. feat: When editing a v2 library xblock, update search index synchronously (openedx#35495) feat: added ORA graded notification (openedx#35389) * feat: added ORA graded by staff notification * test: updated and added new unit tests * feat: added waffle flag and updated notification chore: update ora2 version in requirements (openedx#35505) feat: use idv approved event (openedx#35470) * feat: replace LEARNER_NOW_VERIFIED signal with new openedx-event fix: Adds a check to initialize legacy proctoring dashboard chore: Fixed a typo on a comment feat: add course_run_key to learner home upgrade url (openedx#35461) * fix: fix learner home URL to have course_run_key feat: upgrading simple api to drf compatible ( 17th ) (openedx#35394) * feat: upgrading simple api to drf compatible. feat: Be able to login to bare-metal studio easily. (openedx#35172) * feat: Be able to login to bare-metal studio easily. Updating the documentation and the devstack.py files so that if you're running bare-metal you can easily setup studio login via the LMS. I also added the Ports that the various MFEs expect to the runserver scripts so that it's easier to run those locally as well. Co-authored-by: Kyle McCormick <kyle@axim.org> feat: [FC-0047] add settings for edx-ace push notifications feat: [FC-0047] Add push notifications for user enroll feat: [FC-0047] Add push notifications for user unenroll feat: [FC-0047] Add push notifications for add course beta testers feat: [FC-0047] Add push notifications for remove course beta testers feat: [FC-0047] Add push notification event to discussions refactor: [FC-0047] rename subject files to title docs: [FC-0047] add docs for setting up mobile push notifications chore: [FC-0047] upgrade requirements style: [FC-0047] add module docstrings refactor: [FC-0047] fix review issues refactor: change name of the policy to course push optout build: remove diff for requirements fix: rename email to message params fix: fix linter warning fix: remove docs from app level style: [FC-0047] fix code style issues chore: [FC-0047] change push notifications texts style: [FC-0047] remove unnecessary pass feat: add block_id field to filterable attributes of meilisearch (openedx#35493) feat: added sender in bulk_email event (openedx#35504) feat: replaced button and heading tags in email digest content (openedx#35518) chore: Aperture code ownership update chore: update default notification preference for ora_grade_assigned (openedx#35522) * chore: update default notification preference for ora_grade_assigned * test: updated tests fix: updated edx.ace.message_sent event (openedx#35498) * fix: updated edx.ace.message_sent event * fix: fixed pylint checks fix: fix broken proctoring settings link fix: increase grades rounding precision Enabling the rounding in openedx#16837 has been causing noticeable (up to 1 percentage point) differences between non-rounded subsection grades and a total grade for a course. This increases the grade precision to reduce the negative implications of double rounding. chore: add frontend-app-learner-portal-enteprise localhost to trusted origin (openedx#35529) feat: add verification attempt django admin feat: added country disabling feature (openedx#35451) * feat: added country disabling feature feat: upgrade get_student_enrollment_status api with drf (22nd) (openedx#35464) * feat!: upgrading simple api with DRF. fix: don't wrap HTML data with newlines when serializing for LC (openedx#35532) When serializing to OLX, the Learning Core runtime wraps HTML content in CDATA to avoid having to escape every individual `<`, `>`, and `&`. The runtime also puts newlines around the content within the CDATA, So, given HTML content `...`, we get `<![CDATA[\n...\n]]>`. The problem is that every time you serialize an HTML block to OLX, it adds another pair of newlines. These newlines aren't visible to the end users, but they do make it so that importing and exporting content never reached a stable, aka "canonical" form. It also makes unit testing difficult, because the value of `html_block.data` becomes a moving target. We do not believe these newlines are necessary, so we have removed them from the `CDATA` block, and added a unit test to ensure that HTML blocks having a canonical serialization. Closes: openedx#35525 fix(deps): update dependency underscore to v1.13.0 [security] feat: Upgrade Python dependency edx-enterprise (openedx#35538) Bump the version to drop references to edx-rest-api-client that don't exist in the latest version. Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` Co-authored-by: feanil <781561+feanil@users.noreply.github.com> fix(deps): update dependency underscore to v1.13.1 [security] Soft delete collections (openedx#35496) * refactor: use django signals to trigger LIBRARY_COLLECTION events * refactor: use collection usage_key as search document id This change standardises the search document "id" to be a meilisearch ID generated from the usage key, for all types of indexed objects. This is important for collections so we can locate the collection document in the search index solely from the data provided by the LIBRARY_COLLECTION_DELETED event (library_key + collection_key), even if the collection has been deleted from the database. * refactor: avoid fetching more data than we have to. * get_library_collection_usage_key and searchable_doc_tags_for_collection do not need a Collection object; the usage key can be created from the library_key and collection_key. * updated searchable_doc_for_collection to require the parts of the collection usage key + an optional collection. This allows us to identify the collection's search document from its usage key without requiring an existing Collection object (in case it's been deleted). Also removes the edge case for indexing Collections not associated with a ContentLibrary -- this won't ever really happen. * feat: remove soft- and hard-deleted collections from search index * feat: adds library_component_usage_key to content_libraries.api * refactor: send CONTENT_OBJECT_ASSOCIATON_CHANGED on django model signals so that added/removed collections are removed/re-added to component documents. Special case: When a collection is soft-deleted/restored, we detect this in the search index and update the collection's component documents directly, without a CONTENT_OBJECT_ASSOCIATON_CHANGED signal. * chore: bumps openedx-learning to 0.13.0 feat: return modified field on get component endpoint (openedx#35508) feat: pluggable url for idv location (openedx#35494) * Adds an extension point when generating the url for id verification chore: version bump fix: Delete flaky test `test_get_user_group_id_for_partition` (openedx#35545) This test failed on 2024-08-06 and 2024-09-24 but passed on re-run. Deleted according to flaky test process: https://openedx.atlassian.net/wiki/spaces/AC/pages/4306337795/Flaky+Test+Process Flaky test ticket: https://2u-internal.atlassian.net/browse/CR-7071 feat: set links for CourseAuthoring discussion alert fix: whitespace issues in some capa problem index_dictionary content (openedx#35543) fix: suppress errors+warnings when video is used in a content library (openedx#35544) build: Manually pull some RTD Context. See https://about.readthedocs.com/blog/2024/07/addons-by-default/ for details but essentially RTD is changing how it's building docs and this will let us handle the change gracefully. chore: bumps openedx-learning to 0.13.1 (openedx#35547) chore: Upgrade Python requirements test: Use the correct exception. This test doesn't actually care about the type of the exception but use the Requests exception that you're likely to get instead of the edx-restapi-client/slumber one from before we dropped them. test: Update a test based on changes to pytz. pytz dropped the Asia/Almaty timezone according to IANA stub42/pytz@640c9bd#diff-16061815f611262054e469307ca063a4ef47e158a97784f1e91d254f074324bfR72 chore: version bump fix: bump version chore: version bump build: Switch to ubuntu-latest for builds This code does not have any dependencies that are specific to any specific version of ubuntu. So instead of testing on a specific version and then needing to do work to keep the versions up-to-date, we switch to the ubuntu-latest target which should be sufficient for testing purposes. This work is being done as a part of openedx/platform-roadmap#377 closes openedx#35314 build: Run mongosh commands within the container. This is no longer installed by default on ubuntu and so we have to either manually install it or just run the relevant commands in the container here it's already available. This lets us do some of the test setup in a more robust way. fix: Don't start the mongo service. We stopped using mongo on the runner directly a while ago so this is just an errant start that should have been removed. build!: enable md4 for testing. Operators Note: In newer versions of ubuntu the MD4 hashing algorithm is disabled by default. To enable it the openssl config needs to be updated in a manner similar to what's being done here. Alternatively, you can set the `FEATURES['ENABLE_BLAKE2B_HASHING']` setting to `True` which will switch to a newer hashing algorithm where MD4 was previously used. Because this hashing is being used as a part of the edx-platform caching mechanism, this will effectively clear the cache for the items that use this hash. The will impact any items where the cache key might have been too big to store in memcache so it's hard to predict exactly which items will be impacted. BREAKING CHANGE: See the operator note above for more details as this may break for users transitioning from Ubuntu 20.04 to newer versions. fix: add should_display_status_to_user method and status_changed field to VerificationAttempt model (openedx#35514) * fix: add placeholder should_display_status_to_user * fix: have VerificationAttempt inherit StatusModel - should_display_status_to_user now returns False * chore: makemigrations * feat: status_changed field added * temp: idea to add should_display_status_to_user * feat: add should_display_status_to_user * fix: correct call in helpers+services * chore: lint+test fix * fix: default hide_status_user as False * chore: rename field call to STATUS * chore: remove extra status field - comment cleanup * temp: lint + comment out created status for now * fix: revamp status_changed for back-compat * fix: override save for status_changed * fix: replace created/updated instead of status - also made migrations * fix: squash commits - also remove extra updated_at property * chore: nits fix: resolve inconsistant python dependencies - run `make compile-requirements forum`. Error: It appears that the Python dependencies in this PR are inconsistent: A re-run of `make compile-requirements` produced changes. - fix quality checks fix: fix new failing tests - fix new tests related to discussion that failed after fixing previous tests these are failing due to no.of argument difference https://github.com/openedx/edx-platform/actions/runs/11069160532/job/30756121710?pr=35490 feat: migrate user active_thread api feat: migrate fetch subscription feat: add python native APIs from forum v2 - migrate following native APIs i.e. mark_thread_as_read, create_subscription, delete_subscription, update_thread_votes, update_comment_votes, delete_thread_vote, delete_comment_vote, get_user_threads, retire_user, update_username, get_user_course_stats, update_users_in_course, flag/unflag comment/threads from forum v2 to edx-platform - refactor some code feat: update thread apis feat: add threads api fix: quality checks feat: migrate update_user api feat: retrieve course_id fix: course_id issue for course_waffle flag fix: temp chore: code refactor, fix quality checks feat: add tests for native APIs in this commit: - migrated the tests for native APIs from test_serializers to test_serializers_native_views file. - tests from test_views to test_views_native_views is still in progress - fixed edx-platform tests which were failing after we added get course_id APIs - fixed course_key error for user's retrieve APIs feat: add group_id actions tests feat: new native APIs tests progress feat: Upgrade Python dependency edx-enterprise Removed loggings for SAPSF channel Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` chore: delete unused tags_count from LibraryXBlockMetadata (openedx#35510) chore: revert learner pathway skeleton implementation (openedx#30355) fix: added ace_enabled in bulk_email logs (openedx#35558) feat: deprecate get_verification_details_by_id (openedx#35560) fix: connect verify_student handlers to app (openedx#35561) refactor: Lift methods out of StaticContentServer (unchanged and broken) Remove class declaration and simply de-indent contents by 4 spaces. This results in broken code due to lingering `self` references, but should make diffs easier to understand. refactor: Fix content server methods and tests (finish method lift) Some lingering cleanup from the transition from a middleware to a view. See openedx#34702 for context. - Remove IMPL and self/StaticContentServer references - Add newlines to satisfy code style linter - Fix test references - Update module docstring style: Fix some lint issues that had been amnestied Several now-irrelevant lint-disables and one legit one that was easy to fix. feat: Upgrade Python dependency edx-enterprise version bump Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` fix: handle missing name in readonly enterprise account fields The `settings.ENTERPRISE_READONLY_ACCOUNT_FIELDS` list can be overridden. Removing the `name` from it should not raise the `ValueError` exception. feat!: upgrading simple api with DRF. (openedx#35463) fix: gate use of proctoring api if provider is LTI based (openedx#35564) docs: Fix links to extensions docs. The extensions docs did not get linked from the index previously. Add them to the docs tree to make them easier to find. fix: remove deprecated runtime.render_template fix: allow courses to render with invalid proctoring provider (openedx#35573) fix: receive XBlock visibility from the Learning MFE (openedx#35491) feat: update ora settings course app for clarity (openedx#35550) feat: Upgrade Python dependency edx-django-utils (openedx#35575) Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` Co-authored-by: dianakhuang <2952947+dianakhuang@users.noreply.github.com> feat: added notification grouping (openedx#35368) Co-authored-by: Ahtisham Shahid <ahtisham300@gmail.com> feat!: upgrading mark_student_can_skip_entrance_exam api with DRF ( 21 ) (openedx#35460) * feat!: upgrading simple api with DRF. feat: history tracking on SAMLProviderConfig model chore: geoip2: update maxmind geolite country database docs: Update the docs to build on the latest python version. feat: set bulk email transactional to True (openedx#35579) feat!: removes deprecated v1 certificate behavior (openedx#35562) * feat!: removes deprecated v1 certificate behavior this removes the long-deprecated v1 certificate behavior. This removes the old-style date selection behavior (ie., not a choice between *Immediately upon passing*, *End date of course*, *A date after the course end date*), which is no longer reliably maintained or supported in Studio or Credentials. FIXES: openedx#35399 feat: Upgrade Python dependency edx-enterprise edx-enterprise 4.26.1 | proxy login redirects to LMS register page Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` feat: override refund fix: _auto_enroll is private fix: remove 'toggle_status: unsupported' from COURSES_INVITE_ONLY (openedx#35572) feat: Upgrade Python dependency edx-proctoring (openedx#35589) 4.18.2 fixes bugs caused by a removed proctoring provider Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` Co-authored-by: alangsto <46360176+alangsto@users.noreply.github.com> feat!: upgrading api to DRF. (openedx#35536) feat: rework idv cert trigger (openedx#35580) * feat: rework idv cert trigger * feat: separate PhotoVerification events upgrade get_students_features api with DRF( 7th api ) (openedx#35323) * feat: upgrading simple api to drf compatible. chore: Update edx-enterprise to 4.27.0 ENT-9585 docs: Add README for third_party_auth. (openedx#35608) chore: calc version bump (openedx#35590) chore: Remove edge reference in notification fix: VerificationAttempt.expiration_datetime field may be None. This commit fixes a bug introduced by the new VerificationAttempt model. The expiration_datetime field is nullable. Other IDV models in the verify_student application have a default value for expiration_date, so they are typically not null, despite being nullable. This commit updates code that queries this field to function correctly when the value of expiration_datetime is None. In this case, a None expiration_datetime indicates a non-expiring attempt. feat: Upgrade Python dependency edx-name-affirmation (openedx#35616) 3.0.1 contains changes to integrate the name affirmation app with the new platform VerificationAttempt model Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` Co-authored-by: alangsto <46360176+alangsto@users.noreply.github.com> fix: Improve v2 library block permissions checks for read-only authors (openedx#35598) chore: removed style from email digest content (openedx#35592) chore: cleanup constraint file and format it (openedx#35601) * chore: cleanup constraint file and format it chore: move native API tests to separate PR fix: CI checks chore: change the forum branch to master fix: older edx-platform tests that uses V1 - Before resolving course_id availability issue for all APIs to be used in CourseWaffle flag, only 4 files tests were failing, We fixed those. Now due to latest fixes, some more tests were failing that uses v1, this PR will fix those issues. feat: Upgrade Python dependency edx-enterprise version bump Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` chore: changing codeowners for several components (openedx#35574) making sure the codeowners for some maintainership is accurate. feat: update management command to manually create verified names (openedx#35619) * feat: update management command to manually create verified names * fix: update function name feat: pass course_id to native APIs course_id is needed to be used in second coursewaffle flag feat: Use jammy repositories for mongo installation. Unclear if there was a change in the focal repositories or if there was an issue with something else. The noble repositories don't support 7.0, so we're stuck here until we upgrade to 8.0. feat: Unpin xmlsec and lxml. We are now on Python 3.11 and running tests on the latest version of Ubuntu, which seems to mean we don't need these pins anymore. In fact, it seems to break while on these pins. fix: update functions to named arguments fix: pylint issues fix(deps): update dependency @edx/frontend-component-cookie-policy-banner to v2.6.0 fix: tests, add mocks for getting course_id APIs Revert "feat: Unpin xmlsec and lxml." This reverts commit 6c045c7. Revert "feat: Use jammy repositories for mongo installation." This reverts commit a245dec. fix: Pin select jobs to ubuntu 22.04. Using Ubuntu 24.04 breaks Mongo installation and some thing involving lxml/xmlsec. We are going to pin this until we're ready to upgrade both. Revert "fix(deps): update dependency @edx/frontend-component-cookie-policy-banner to v2.6.0" This reverts commit a39367b. fix: failing unit tests refactor: remove unnecessary try catch feat: Upgrade Python dependency edx-enterprise (openedx#35625) Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` Co-authored-by: kiram15 <31229189+kiram15@users.noreply.github.com> refactor: get rid of XBlockRuntimeSystem for v2 libraries (openedx#35624) feat: remove all the commerce coordinator (openedx#35527) fix: fix track selection (openedx#35648) feat: waffle flag based switch to ses for goal reminder email (openedx#35615) * feat: waffle based switch to ses for goal reminder email * test: added test cases for ace message parameters * feat: updated logic to specify channel name * chore: update edx-ace version refactor: remove PII from log messages in programs tasks (openedx#35623) * refactor: remove PII from log messages in programs tasks [APER-3723] Refactors a number of log statements from the Celery tasks in the Programs Django app. This removes username (considered PII) from the log statements and opts to use LMS User ID instead. * fix: quality feat: set collections for a library component [FC-0062] (openedx#35600) * feat: add & remove collections to component Co-authored-by: Rômulo Penido <romulo.penido@gmail.com> Co-authored-by: Chris Chávez <xnpiochv@gmail.com> feat!: Remove outdated Libraries Relaunch cruft (openedx#35644) The V2 libraries project had a few past iterations which were never launched. This commit cleans up pieces from those which we don't need for the real Libraries Relaunch MVP in Sumac: * Remove ENABLE_LIBRARY_AUTHORING_MICROFRONTEND, LIBRARY_AUTHORING_FRONTEND_URL, and REDIRECT_TO_LIBRARY_AUTHORING_MICROFRONTEND, all of which are obsolete now that library authoring has been merged into https://github.com/openedx/frontend-app-authoring. More details on the new Content Libraries configuration settings are here: openedx/frontend-app-authoring#1334 * Remove dangling support for syncing V2 (learning core-backed) library content using the LibraryContentBlock. This code was all based on an older understanding of V2 Content Libraries, where the libraries were smaller and versioned as a whole rather then versioned by-item. Reference to V2 libraries will be done on a per-block basis using the upstream/downstream system, described here: https://github.com/openedx/edx-platform/blob/master/docs/decisions/0020-upstream-downstream.rst It's important that we remove this support now so that OLX course authors don't stuble upon it and use it, which would be buggy and complicate future migrations. * Remove the "mode" parameter from LibraryContentBlock. The only supported mode was and is "random". We will not be adding any further modes. Going forward for V2, we will have an ItemBank block for randomizing items (regardless of source), which can be synthesized with upstream referenced as described above. Existing LibraryContentBlocks will be migrated. * Finally, some renamings: * LibraryContentBlock -> LegacyLibraryContentBlock * LibraryToolsService -> LegacyLibraryToolsService * LibrarySummary -> LegacyLibrarySummary Module names and the old OLX tag (library_content) are unchanged. Closes: openedx/frontend-app-authoring#1115 feat: adaptive display of links Do not display the 'Learn more' and 'Share feedback' links for banner that is enabled by the context_course.discussions_settings flag if the URLs for these links are not set in the settings. temp: logs for unsubscribe event (openedx#35652) feat: removed extra spaces from start and end of content (openedx#35647) feat: added waffle flag for new notification view (openedx#35569) feat!: hide courses in /courses based on catalog visibility Previously, courses were always displayed on the LMS /courses page, independently of their catalog visibility attribute. This meant that even with visibility="none" courses were being displayed. This was very counter-intuitive. With this change, courses are displayed only when their visibility is set to "both". This change is flagged as breaking because it has the potential to affect course catalogs in existing platforms. To test this change, go to http(s)://LMS/courses as an anonymous user. Pick a visible course and go to its "advanced settings" in the studio. Set "Course visibility in catalog" to "about" or "none". Then, clear the cache with the following command: ./manage.py lms shell -c "from django.core.cache import cache; cache.clear()" Open the /courses page again: the course should no longer be visible. Close openedx/wg-build-test-release#330 feat: new view & API calls to serve content library assets (openedx#35639) This commit adds a new view to serve static assets for content libraries, along with Content Library API calls to add, delete, and get metadata about these assets. These assets come from Learning Core and should ONLY BE ACCESSED FROM STUDIO. Users must have read access to the library in order to see an asset in that library. This also re-implements video transcript support for content libraries and re-enables some previously disabled tests around it. feat: Allow specifying a version when loading a v2 XBlock (openedx#35626) chore: delete unused requirements.txt file (openedx#35637) As far as I know, this file is unused. It was not updated since 2022. If it is actually being used, then maybe we should use instead a file from requirements/edx/. fix: Fix pylint_django_settings plugin (openedx#35497) chore: Upgrade Python requirements (openedx#35651) feat: Upgrade Python dependency edx-enterprise 4.28.0 | Introduce default enrollment models Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` build: Pin MyPY due to internal error Currently all PRs are failing on an INTERNAL ERROR in MyPY that seems to have been introduced in 1.12.0. This pins edx-platform to <1.12.0 until we can find out more information and hopefully get an upstream fix. build: Propagate MyPY constraint The MyPY constraint is propagated to development.txt docs: Add issue comment for unpinning MyPY Co-authored-by: Muhammad Farhan <muhammad.farhan@arbisoft.com> feat: Upstream Sync with Content Library Blocks (openedx#34925) This introdues the idea of "upstream" and "downstream" content, where downstreams (like course components) can pull content updates from upstreams (like learning core-backed content library blocks). This supports the upcoming Content Libraries Relaunch Beta for Sumac. New features include: * A new XBlockMixin: UpstreamSyncMixin. * A new CMS Python API: cms.lib.xblock.upstream_sync * A new CMS JSON API: /api/contentstore/v2/downstreams * A temporary, very basic UI for syncing from Content Library blocks Implements: https://github.com/kdmccormick/edx-platform/blob/kdmccormick/upstream-proto/docs/decisions/0020-upstream-block.rst Co-authored-by: Braden MacDonald <braden@opencraft.com> feat: versioned asset support for Learning Core XBlock runtime Add support for displaying static assets in the Learing Core XBlock runtime via "/static/asset-name" style substitutions in the OLX. This is currently used for new Content Library components. Static asset display is version-aware, so viewing older versions of the XBlock content via the embed view will show the appropriate assets for that version. test: add data.py to acceptable isolated app imports Per OEP-49, both api.py and data.py are allowed to be imported into other apps: https://open-edx-proposals.readthedocs.io/en/latest/best-practices/oep-0049-django-app-patterns.html#api-py
1 parent 6a63cfc commit 59a0227

File tree

308 files changed

+9927
-3892
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

308 files changed

+9927
-3892
lines changed

.github/CODEOWNERS

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ lms/djangoapps/grades/
1515
lms/djangoapps/instructor/
1616
lms/djangoapps/instructor_task/
1717
lms/djangoapps/mobile_api/
18+
openedx/core/djangoapps/commerce/ @openedx/2u-infinity
1819
openedx/core/djangoapps/credentials @openedx/2U-aperture
1920
openedx/core/djangoapps/credit @openedx/2U-aperture
21+
openedx/core/djangoapps/enrollments/ @openedx/2U-aperture
2022
openedx/core/djangoapps/heartbeat/
2123
openedx/core/djangoapps/oauth_dispatch
2224
openedx/core/djangoapps/user_api/ @openedx/2U-aperture
2325
openedx/core/djangoapps/user_authn/ @openedx/2U-vanguards
26+
openedx/core/djangoapps/verified_track_content/ @openedx/2u-infinity
2427
openedx/features/course_experience/
2528
xmodule/
2629

@@ -35,15 +38,18 @@ common/djangoapps/track/
3538
lms/djangoapps/certificates/ @openedx/2U-aperture
3639

3740
# Discovery
38-
common/djangoapps/course_modes/
41+
common/djangoapps/course_modes/ @openedx/2U-aperture
3942
common/djangoapps/enrollment/
40-
lms/djangoapps/commerce/
41-
lms/djangoapps/experiments/
42-
lms/djangoapps/learner_dashboard/ @openedx/2U-aperture
43-
lms/djangoapps/learner_home/ @openedx/2U-aperture
44-
openedx/features/content_type_gating/
43+
common/djangoapps/entitlements/ @openedx/2U-aperture
44+
lms/djangoapps/branding/ @openedx/2U-aperture
45+
lms/djangoapps/commerce/ @openedx/2u-infinity
46+
lms/djangoapps/experiments/ @openedx/2u-infinity
47+
lms/djangoapps/gating/ @openedx/2u-infinity
48+
lms/djangoapps/learner_dashboard/ @openedx/2U-aperture
49+
lms/djangoapps/learner_home/ @openedx/2U-aperture
50+
openedx/features/content_type_gating/ @openedx/2u-infinity
4551
openedx/features/course_duration_limits/
46-
openedx/features/discounts/
52+
openedx/features/discounts/ @openedx/2u-infinity
4753

4854
# Ping Axim On-call if someone uses the QuickStart
4955
# https://docs.openedx.org/en/latest/developers/quickstarts/first_openedx_pr.html

.github/workflows/ci-static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
matrix:
1111
python-version:
1212
- "3.11"
13-
os: ["ubuntu-20.04"]
13+
os: ["ubuntu-22.04"]
1414

1515
steps:
1616
- uses: actions/checkout@v4

.github/workflows/compile-python-requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ defaults:
1515

1616
jobs:
1717
recompile-python-dependencies:
18-
runs-on: ubuntu-20.04
18+
runs-on: ubuntu-latest
1919

2020
steps:
2121
- name: Check out target branch

.github/workflows/js-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
os: [ubuntu-20.04]
15+
os: [ubuntu-latest]
1616
node-version: [18, 20]
1717
python-version:
1818
- "3.11"

.github/workflows/lint-imports.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
lint-imports:
1111
name: Lint Python Imports
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-latest
1313

1414
steps:
1515
- name: Check out branch

.github/workflows/migrations-check.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
matrix:
16-
os: [ubuntu-20.04]
16+
os: [ubuntu-22.04]
1717
python-version:
1818
- "3.11"
1919
# 'pinned' is used to install the latest patch version of Django
@@ -52,7 +52,7 @@ jobs:
5252
steps:
5353
- name: Setup mongodb user
5454
run: |
55-
mongosh edxapp --eval '
55+
docker exec ${{ job.services.mongo.id }} mongosh edxapp --eval '
5656
db.createUser(
5757
{
5858
user: "edxapp",
@@ -67,7 +67,7 @@ jobs:
6767
- name: Verify mongo and mysql db credentials
6868
run: |
6969
mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select 1;" edxapp
70-
mongosh --host 127.0.0.1 --username edxapp --password password --eval 'use edxapp; db.adminCommand("ping");' edxapp
70+
docker exec ${{ job.services.mongo.id }} mongosh --host 127.0.0.1 --username edxapp --password password --eval 'use edxapp; db.adminCommand("ping");' edxapp
7171
7272
- name: Checkout repo
7373
uses: actions/checkout@v4
@@ -126,7 +126,7 @@ jobs:
126126
if: always()
127127
needs:
128128
- check_migrations
129-
runs-on: ubuntu-latest
129+
runs-on: ubuntu-22.04
130130
steps:
131131
- name: Decide whether the needed jobs succeeded or failed
132132
# uses: re-actors/alls-green@v1.2.1

.github/workflows/publish-ci-docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
push:
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1111

1212
steps:
1313
- name: Checkout

.github/workflows/pylint-checks.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@ on:
88

99
jobs:
1010
run-pylint:
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-22.04
1212
strategy:
1313
fail-fast: false
1414
matrix:
1515
include:
1616
- module-name: lms-1
17-
path: "--django-settings-module=lms.envs.test lms/djangoapps/badges/ lms/djangoapps/branding/ lms/djangoapps/bulk_email/ lms/djangoapps/bulk_enroll/ lms/djangoapps/bulk_user_retirement/ lms/djangoapps/ccx/ lms/djangoapps/certificates/ lms/djangoapps/commerce/ lms/djangoapps/course_api/ lms/djangoapps/course_blocks/ lms/djangoapps/course_home_api/ lms/djangoapps/course_wiki/ lms/djangoapps/coursewarehistoryextended/ lms/djangoapps/debug/ lms/djangoapps/courseware/ lms/djangoapps/course_goals/ lms/djangoapps/rss_proxy/"
17+
path: "lms/djangoapps/badges/ lms/djangoapps/branding/ lms/djangoapps/bulk_email/ lms/djangoapps/bulk_enroll/ lms/djangoapps/bulk_user_retirement/ lms/djangoapps/ccx/ lms/djangoapps/certificates/ lms/djangoapps/commerce/ lms/djangoapps/course_api/ lms/djangoapps/course_blocks/ lms/djangoapps/course_home_api/ lms/djangoapps/course_wiki/ lms/djangoapps/coursewarehistoryextended/ lms/djangoapps/debug/ lms/djangoapps/courseware/ lms/djangoapps/course_goals/ lms/djangoapps/rss_proxy/"
1818
- module-name: lms-2
19-
path: "--django-settings-module=lms.envs.test lms/djangoapps/gating/ lms/djangoapps/grades/ lms/djangoapps/instructor/ lms/djangoapps/instructor_analytics/ lms/djangoapps/discussion/ lms/djangoapps/edxnotes/ lms/djangoapps/email_marketing/ lms/djangoapps/experiments/ lms/djangoapps/instructor_task/ lms/djangoapps/learner_dashboard/ lms/djangoapps/learner_home/ lms/djangoapps/lms_initialization/ lms/djangoapps/lms_xblock/ lms/djangoapps/lti_provider/ lms/djangoapps/mailing/ lms/djangoapps/mobile_api/ lms/djangoapps/monitoring/ lms/djangoapps/ora_staff_grader/ lms/djangoapps/program_enrollments/ lms/djangoapps/rss_proxy lms/djangoapps/static_template_view/ lms/djangoapps/staticbook/ lms/djangoapps/support/ lms/djangoapps/survey/ lms/djangoapps/teams/ lms/djangoapps/tests/ lms/djangoapps/user_tours/ lms/djangoapps/verify_student/ lms/djangoapps/mfe_config_api/ lms/envs/ lms/lib/ lms/tests.py"
19+
path: "lms/djangoapps/gating/ lms/djangoapps/grades/ lms/djangoapps/instructor/ lms/djangoapps/instructor_analytics/ lms/djangoapps/discussion/ lms/djangoapps/edxnotes/ lms/djangoapps/email_marketing/ lms/djangoapps/experiments/ lms/djangoapps/instructor_task/ lms/djangoapps/learner_dashboard/ lms/djangoapps/learner_home/ lms/djangoapps/lms_initialization/ lms/djangoapps/lms_xblock/ lms/djangoapps/lti_provider/ lms/djangoapps/mailing/ lms/djangoapps/mobile_api/ lms/djangoapps/monitoring/ lms/djangoapps/ora_staff_grader/ lms/djangoapps/program_enrollments/ lms/djangoapps/rss_proxy lms/djangoapps/static_template_view/ lms/djangoapps/staticbook/ lms/djangoapps/support/ lms/djangoapps/survey/ lms/djangoapps/teams/ lms/djangoapps/tests/ lms/djangoapps/user_tours/ lms/djangoapps/verify_student/ lms/djangoapps/mfe_config_api/ lms/envs/ lms/lib/ lms/tests.py"
2020
- module-name: openedx-1
21-
path: "--django-settings-module=lms.envs.test openedx/core/types/ openedx/core/djangoapps/ace_common/ openedx/core/djangoapps/agreements/ openedx/core/djangoapps/api_admin/ openedx/core/djangoapps/auth_exchange/ openedx/core/djangoapps/bookmarks/ openedx/core/djangoapps/cache_toolbox/ openedx/core/djangoapps/catalog/ openedx/core/djangoapps/ccxcon/ openedx/core/djangoapps/commerce/ openedx/core/djangoapps/common_initialization/ openedx/core/djangoapps/common_views/ openedx/core/djangoapps/config_model_utils/ openedx/core/djangoapps/content/ openedx/core/djangoapps/content_libraries/ openedx/core/djangoapps/content_staging/ openedx/core/djangoapps/contentserver/ openedx/core/djangoapps/cookie_metadata/ openedx/core/djangoapps/cors_csrf/ openedx/core/djangoapps/course_apps/ openedx/core/djangoapps/course_date_signals/ openedx/core/djangoapps/course_groups/ openedx/core/djangoapps/courseware_api/ openedx/core/djangoapps/crawlers/ openedx/core/djangoapps/credentials/ openedx/core/djangoapps/credit/ openedx/core/djangoapps/dark_lang/ openedx/core/djangoapps/debug/ openedx/core/djangoapps/discussions/ openedx/core/djangoapps/django_comment_common/ openedx/core/djangoapps/embargo/ openedx/core/djangoapps/enrollments/ openedx/core/djangoapps/external_user_ids/ openedx/core/djangoapps/zendesk_proxy/ openedx/core/djangolib/ openedx/core/lib/ openedx/core/tests/ openedx/core/djangoapps/course_live/"
21+
path: "openedx/core/types/ openedx/core/djangoapps/ace_common/ openedx/core/djangoapps/agreements/ openedx/core/djangoapps/api_admin/ openedx/core/djangoapps/auth_exchange/ openedx/core/djangoapps/bookmarks/ openedx/core/djangoapps/cache_toolbox/ openedx/core/djangoapps/catalog/ openedx/core/djangoapps/ccxcon/ openedx/core/djangoapps/commerce/ openedx/core/djangoapps/common_initialization/ openedx/core/djangoapps/common_views/ openedx/core/djangoapps/config_model_utils/ openedx/core/djangoapps/content/ openedx/core/djangoapps/content_libraries/ openedx/core/djangoapps/content_staging/ openedx/core/djangoapps/contentserver/ openedx/core/djangoapps/cookie_metadata/ openedx/core/djangoapps/cors_csrf/ openedx/core/djangoapps/course_apps/ openedx/core/djangoapps/course_date_signals/ openedx/core/djangoapps/course_groups/ openedx/core/djangoapps/courseware_api/ openedx/core/djangoapps/crawlers/ openedx/core/djangoapps/credentials/ openedx/core/djangoapps/credit/ openedx/core/djangoapps/dark_lang/ openedx/core/djangoapps/debug/ openedx/core/djangoapps/discussions/ openedx/core/djangoapps/django_comment_common/ openedx/core/djangoapps/embargo/ openedx/core/djangoapps/enrollments/ openedx/core/djangoapps/external_user_ids/ openedx/core/djangoapps/zendesk_proxy/ openedx/core/djangolib/ openedx/core/lib/ openedx/core/tests/ openedx/core/djangoapps/course_live/"
2222
- module-name: openedx-2
23-
path: "--django-settings-module=lms.envs.test openedx/core/djangoapps/geoinfo/ openedx/core/djangoapps/header_control/ openedx/core/djangoapps/heartbeat/ openedx/core/djangoapps/lang_pref/ openedx/core/djangoapps/models/ openedx/core/djangoapps/monkey_patch/ openedx/core/djangoapps/oauth_dispatch/ openedx/core/djangoapps/olx_rest_api/ openedx/core/djangoapps/password_policy/ openedx/core/djangoapps/plugin_api/ openedx/core/djangoapps/plugins/ openedx/core/djangoapps/profile_images/ openedx/core/djangoapps/programs/ openedx/core/djangoapps/safe_sessions/ openedx/core/djangoapps/schedules/ openedx/core/djangoapps/service_status/ openedx/core/djangoapps/session_inactivity_timeout/ openedx/core/djangoapps/signals/ openedx/core/djangoapps/site_configuration/ openedx/core/djangoapps/system_wide_roles/ openedx/core/djangoapps/theming/ openedx/core/djangoapps/user_api/ openedx/core/djangoapps/user_authn/ openedx/core/djangoapps/util/ openedx/core/djangoapps/verified_track_content/ openedx/core/djangoapps/video_config/ openedx/core/djangoapps/video_pipeline/ openedx/core/djangoapps/waffle_utils/ openedx/core/djangoapps/xblock/ openedx/core/djangoapps/xmodule_django/ openedx/core/tests/ openedx/features/ openedx/testing/ openedx/tests/ openedx/core/djangoapps/learner_pathway/ openedx/core/djangoapps/notifications/ openedx/core/djangoapps/staticfiles/ openedx/core/djangoapps/content_tagging/"
23+
path: "openedx/core/djangoapps/geoinfo/ openedx/core/djangoapps/header_control/ openedx/core/djangoapps/heartbeat/ openedx/core/djangoapps/lang_pref/ openedx/core/djangoapps/models/ openedx/core/djangoapps/monkey_patch/ openedx/core/djangoapps/oauth_dispatch/ openedx/core/djangoapps/olx_rest_api/ openedx/core/djangoapps/password_policy/ openedx/core/djangoapps/plugin_api/ openedx/core/djangoapps/plugins/ openedx/core/djangoapps/profile_images/ openedx/core/djangoapps/programs/ openedx/core/djangoapps/safe_sessions/ openedx/core/djangoapps/schedules/ openedx/core/djangoapps/service_status/ openedx/core/djangoapps/session_inactivity_timeout/ openedx/core/djangoapps/signals/ openedx/core/djangoapps/site_configuration/ openedx/core/djangoapps/system_wide_roles/ openedx/core/djangoapps/theming/ openedx/core/djangoapps/user_api/ openedx/core/djangoapps/user_authn/ openedx/core/djangoapps/util/ openedx/core/djangoapps/verified_track_content/ openedx/core/djangoapps/video_config/ openedx/core/djangoapps/video_pipeline/ openedx/core/djangoapps/waffle_utils/ openedx/core/djangoapps/xblock/ openedx/core/djangoapps/xmodule_django/ openedx/core/tests/ openedx/features/ openedx/testing/ openedx/tests/ openedx/core/djangoapps/notifications/ openedx/core/djangoapps/staticfiles/ openedx/core/djangoapps/content_tagging/"
2424
- module-name: common
25-
path: "--django-settings-module=lms.envs.test common pavelib"
25+
path: "common pavelib"
2626
- module-name: cms
27-
path: "--django-settings-module=cms.envs.test cms"
27+
path: "cms"
2828
- module-name: xmodule
29-
path: "--django-settings-module=lms.envs.test xmodule"
29+
path: "xmodule"
3030

3131
name: pylint ${{ matrix.module-name }}
3232
steps:
@@ -75,7 +75,7 @@ jobs:
7575
if: always()
7676
needs:
7777
- run-pylint
78-
runs-on: ubuntu-latest
78+
runs-on: ubuntu-22.04
7979
steps:
8080
- name: Decide whether the needed jobs succeeded or failed
8181
# uses: re-actors/alls-green@v1.2.1

.github/workflows/quality-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
matrix:
16-
os: [ubuntu-20.04]
16+
os: [ubuntu-22.04]
1717
python-version:
1818
- "3.11"
1919
node-version: [20]

.github/workflows/semgrep.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: "${{ matrix.os }}"
1818
strategy:
1919
matrix:
20-
os: ["ubuntu-20.04"]
20+
os: ["ubuntu-latest"]
2121
python-version:
2222
- "3.11"
2323

.github/workflows/static-assets-check.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
os: [ubuntu-20.04]
15+
os: [ubuntu-22.04]
1616
python-version:
1717
- "3.11"
1818
node-version: [18, 20]
@@ -72,9 +72,6 @@ jobs:
7272
run: |
7373
pip install -r requirements/edx/assets.txt
7474
75-
- name: Initiate Mongo DB Service
76-
run: sudo systemctl start mongod
77-
7875
- name: Add node_modules bin to $Path
7976
run: echo $GITHUB_WORKSPACE/node_modules/.bin >> $GITHUB_PATH
8077

.github/workflows/unit-tests.yml

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
jobs:
1616
run-tests:
1717
name: ${{ matrix.shard_name }}(py=${{ matrix.python-version }},dj=${{ matrix.django-version }},mongo=${{ matrix.mongo-version }})
18-
runs-on: ubuntu-20.04
18+
runs-on: ubuntu-22.04
1919
strategy:
2020
matrix:
2121
python-version:
@@ -66,7 +66,29 @@ jobs:
6666

6767
- name: install system requirements
6868
run: |
69-
sudo apt-get update && sudo apt-get install libmysqlclient-dev libxmlsec1-dev lynx
69+
sudo apt-get update && sudo apt-get install libmysqlclient-dev libxmlsec1-dev lynx openssl
70+
71+
# This is needed until the ENABLE_BLAKE2B_HASHING can be removed and we
72+
# can stop using MD4 by default.
73+
- name: enable md4 hashing in libssl
74+
run: |
75+
cat <<EOF | sudo tee /etc/ssl/openssl.cnf
76+
# Use this in order to automatically load providers.
77+
openssl_conf = openssl_init
78+
79+
[openssl_init]
80+
providers = provider_sect
81+
82+
[provider_sect]
83+
default = default_sect
84+
legacy = legacy_sect
85+
86+
[default_sect]
87+
activate = 1
88+
89+
[legacy_sect]
90+
activate = 1
91+
EOF
7092
7193
- name: install mongo version
7294
run: |
@@ -142,7 +164,7 @@ jobs:
142164
overwrite: true
143165

144166
collect-and-verify:
145-
runs-on: ubuntu-20.04
167+
runs-on: ubuntu-22.04
146168
steps:
147169
- uses: actions/checkout@v4
148170
- name: Setup Python
@@ -207,7 +229,7 @@ jobs:
207229
# https://github.com/orgs/community/discussions/33579
208230
success:
209231
name: Unit tests successful
210-
runs-on: ubuntu-20.04
232+
runs-on: ubuntu-22.04
211233
if: always()
212234
needs: [run-tests]
213235
steps:
@@ -218,7 +240,7 @@ jobs:
218240
jobs: ${{ toJSON(needs) }}
219241

220242
compile-warnings-report:
221-
runs-on: ubuntu-20.04
243+
runs-on: ubuntu-22.04
222244
needs: [run-tests]
223245
steps:
224246
- uses: actions/checkout@v4
@@ -246,7 +268,7 @@ jobs:
246268
overwrite: true
247269

248270
merge-artifacts:
249-
runs-on: ubuntu-20.04
271+
runs-on: ubuntu-22.04
250272
needs: [compile-warnings-report]
251273
steps:
252274
- name: Merge Pytest Warnings JSON Artifacts
@@ -266,7 +288,7 @@ jobs:
266288
# Combine and upload coverage reports.
267289
coverage:
268290
if: (github.repository == 'edx/edx-platform-private') || (github.repository == 'openedx/edx-platform' && (startsWith(github.base_ref, 'open-release') == false))
269-
runs-on: ubuntu-20.04
291+
runs-on: ubuntu-22.04
270292
needs: [run-tests]
271293
strategy:
272294
matrix:

.github/workflows/upgrade-one-python-dependency.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ defaults:
2828

2929
jobs:
3030
upgrade-one-python-dependency:
31-
runs-on: ubuntu-20.04
31+
runs-on: ubuntu-latest
3232

3333
steps:
3434
- name: Check out target branch

.github/workflows/verify-dunder-init.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
verify_dunder_init:
1010
name: Verify __init__.py Files
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1212

1313
steps:
1414
- name: Check out branch

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
build:
44
os: "ubuntu-22.04"
55
tools:
6-
python: "3.8"
6+
python: "3.12"
77

88
sphinx:
99
configuration: docs/conf.py

README.rst

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,47 @@ sites)::
124124
./manage.py lms collectstatic
125125
./manage.py cms collectstatic
126126

127+
Set up CMS SSO (for Development)::
128+
129+
./manage.py lms manage_user studio_worker example@example.com --unusable-password
130+
# DO NOT DO THIS IN PRODUCTION. It will make your auth insecure.
131+
./manage.py lms create_dot_application studio-sso-id studio_worker \
132+
--grant-type authorization-code \
133+
--skip-authorization \
134+
--redirect-uris 'http://localhost:18010/complete/edx-oauth2/' \
135+
--scopes user_id \
136+
--client-id 'studio-sso-id' \
137+
--client-secret 'studio-sso-secret'
138+
139+
Set up CMS SSO (for Production):
140+
141+
* Create the CMS user and the OAuth application::
142+
143+
./manage.py lms manage_user studio_worker <email@yourcompany.com> --unusable-password
144+
./manage.py lms create_dot_application studio-sso-id studio_worker \
145+
--grant-type authorization-code \
146+
--skip-authorization \
147+
--redirect-uris 'http://localhost:18010/complete/edx-oauth2/' \
148+
--scopes user_id
149+
150+
* Log into Django admin (eg. http://localhost:18000/admin/oauth2_provider/application/),
151+
click into the application you created above (``studio-sso-id``), and copy its "Client secret".
152+
* In your private LMS_CFG yaml file or your private Django settings module:
153+
154+
* Set ``SOCIAL_AUTH_EDX_OAUTH2_KEY`` to the client ID (``studio-sso-id``).
155+
* Set ``SOCIAL_AUTH_EDX_OAUTH2_SECRET`` to the client secret (which you copied).
127156
Run the Platform
128157
----------------
129158

130159
First, ensure MySQL, Mongo, and Memcached are running.
131160

132161
Start the LMS::
133162

134-
./manage.py lms runserver
163+
./manage.py lms runserver 18000
135164

136165
Start the CMS::
137166

138-
./manage.py cms runserver
167+
./manage.py cms runserver 18010
139168

140169
This will give you a mostly-headless Open edX platform. Most frontends have
141170
been migrated to "Micro-Frontends (MFEs)" which need to be installed and run

0 commit comments

Comments
 (0)