Commit Graph

66833 Commits

Author SHA1 Message Date
Muhammad Sameer Amin
cb76eb5aa4 fix: Handle None identity providers in _user_has_social_auth_record 2025-01-28 18:32:30 +05:00
Deborah Kaplan
1fe67d3f6b feat: increase frequency of scheduled notify credentials (#36180)
`notify_credentials` has 2 ways of running.
1. The manual,  one-off method  which uses `--args_from_database`  to specify what should be sent.
2. [The automated method](7316111b35/openedx/core/djangoapps/credentials/management/commands/notify_credentials.py (L157-L159)), which runs on a regular schedule, to catch anything which fell through the cracks.

The automated method does a certain amount of time/date math in order to calculate the entry point of the window based on the current runtime.  This is, I assume, why it has some hardcoded logic; it's not at all simple to have a `cron`-run  management command running on a regular cadence that can do the same time logic.

```py
        if options['auto']:
            options['end_date'] = datetime.now().replace(minute=0, second=0, microsecond=0)
            options['start_date'] = options['end_date'] - timedelta(hours=4)
```

However, it is not ideal that the actual time window of 4 hours is hardcoded directly into `edx-platform`.

This fix

* creates an overridable `NOTIFY_CREDENTIALS_FREQUENCY` that defaults to 14400 seconds (4 hours).
* pulls that frequency into the quoted code

Using seconds allows maximum flexibility.

FIXES: APER-3383
2025-01-27 22:26:00 +00:00
Deborah Kaplan
8e1e55a0d7 chore: linting as a separate commit (#36179)
I'm letting autoformat hit this file to make it match our current
standards before I actually make any code changes.
2025-01-27 16:53:47 -05:00
Kyle McCormick
dc2a38b1f4 feat: dump_settings management command (#36162)
This command dumps the current Django settings to JSON for
debugging/diagnostics. The output of this command is for *humans*... it
is NOT suitable for consumption by production systems.

In particular, we are introducing this command as part of a series of
refactorings to the Django settings files lms/envs/* and cms/envs/*.
We want to ensure that these refactorings do not introduce any
unexpected breaking changes, so the dump_settings command will both help
us manually verify our refactorings and help operators verify that our
refactorings behave expectedly when using their custom python/yaml
settings files.

Related to: https://github.com/openedx/edx-platform/pull/36131
2025-01-27 15:29:29 -05:00
Deborah Kaplan
e7771d6526 fix: catch a possible exception in beta course configuration (#36172)
* fix: catch a possible exception in beta course configuration

when the learner is a beta tester, and the beta test has been set up with a large duration, the courseware djangoapp can return an overflow error on a timedelta call. In those circumstances, this defaults to returning an unmodified date.

FIXES: APER-3848
2025-01-27 13:59:02 -05:00
Usama Sadiq
2d7a3d3fbd fix: remove pylint constraint (#36169) 2025-01-27 21:25:42 +05:00
Jillian
3847cec503 feat: add and switch to downstream-only fields [FC-0076] (#36158)
Adds the concept of "downstream-only" fields to the XBlock upstream sync logic.

Downstream-only fields are customizable fields set only on the downstream XBlock -- we don't keep track of the upstream field value anywhere on the downstream XBlock. Changes made to these fields in the upstream block are ignored, and if the link to the upstream block is severed, the downstream changes are preserved (not reset back to defaults, like the upstream-tracked customizable fields are).

The fields chosen as "downstream-only" are those related to scoring and grading.

The `max_attempts` field was previously a customizable field that tracked the upstream value. However, because it is scoring-related, it has been converted to a "downstream-only" field.

This change impacts course authors' use of library content in their courses.
2025-01-27 15:37:53 +00:00
Ahtisham Shahid
46c7f6db52 fix: bypass edx ace for sending goal reminder email using ses (#36148) 2025-01-27 12:07:29 +05:00
Troy Sankey
a5b9b87390 Merge pull request #36171 from openedx/pwnage101/upgrade-edx-enterprise-cb55799
feat: Upgrade Python dependency edx-enterprise
2025-01-24 11:57:26 -08:00
pwnage101
19def9266a feat: Upgrade Python dependency edx-enterprise
Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2025-01-24 19:03:55 +00:00
edX requirements bot
cb55799bab chore: Upgrade Python requirements (#36166) 2025-01-24 20:45:35 +05:00
Deborah Kaplan
da348fa456 feat!: Removing the long-deprecated legacy course_modes chooser (#36156)
* feat!: Removing the long-deprecated legacy course_modes chooser

`course_modes/choose.html`  (and its corresponding
`_upgrade_button.html`)  were specifically only used for the edge case
where an enterprise user found themselves in the non-enterprise learner
dashboard, and attempted to  enroll in a course outside of the
enterprise flow. Once upon a time, in a 2U-only workflow, the commerce
system would apply specific discounts for users within the said case.
That's no longer true, and it has never been true outside of this one
company.

Removing this template  cleans up a legacy version of a legacy page that
was, realistically, exclusively seen by  employees of 2U,
and nobody else.

Removes:
* The corresponding testsfor behavior only seen in the legacy page.
* A waffle flag since all cases route as if the flag is set: `VALUE_PROP_TRACK_SELECTION_FLAG`: `course_modes.use_new_track_selection`
* Some variables set in  `CourseModeView` which were only ever rendered in the legacy template (`title_content`, `has_credit_upsell`) have been removed from the class.
* There is a high likelihood that the class is still  a target for re-factoring now that the legacy view is gone, but I'm  hesitant to touch something which is not covered by previously existing tests, because the logic around what template gets rendered when is complex.

FIXES: APER-3779
FIXES: #36090
2025-01-24 10:27:55 -05:00
Usama Sadiq
5f13b5ed30 fix: remove publish-ci-docker-image workflow file (#36164) 2025-01-24 19:58:01 +05:00
Marcos Rigoli
05c7d26135 Merge pull request #36077 from openedx/rijuma/remove-edx-token-utils-dep
chore: Remove edx-token-utils dependency
2025-01-24 11:00:27 -03:00
andrey-canon
3eab7ea27f feat: add site-aware unit test 2025-01-23 18:23:49 -05:00
Feanil Patel
dd86710d9d docs: Update lms/envs/common.py 2025-01-23 16:16:19 -05:00
Marcos
747289bc1a fix: Removed JWT constants from CMS and added comments on how to generate them 2025-01-23 15:55:58 -03:00
Marcos
5d494feb01 chore: Updated defaults for token handling on CMS 2025-01-23 15:55:58 -03:00
Marcos
6e98889748 chore: Updated TOKEN_SIGNING on cms 2025-01-23 15:55:58 -03:00
Marcos
67a56c270f chore: Moved jwt file to openedx.core.lib 2025-01-23 15:55:58 -03:00
Marcos
ca3cd45a79 chore: fix tests 2025-01-23 15:55:58 -03:00
Marcos
3bbf8aca7f chore: Run make compile-requirements to update dependencies 2025-01-23 15:55:58 -03:00
Marcos
3bcbcaac2d chore: Removed unused dependency 2025-01-23 15:55:58 -03:00
Marcos
825931a9b4 chore: Removed edx-token-utils dep and moved necessary logic to the repo 2025-01-23 15:55:58 -03:00
Feanil Patel
2a07080a08 build: Drop an unused Dockerfile (#36161)
* build: Drop an unused Dockerfile

We never cleaned up the docker file we were using for custom github
runners when we switched to standard runners.  This cleans that up and
removes another Docker mention that is out of date.

Co-authored-by: Kyle McCormick <kyle@axim.org>
2025-01-23 13:31:28 -05:00
Feanil Patel
da0d365ee3 Merge pull request #36044 from openedx/pkg_resources-depr
Replace pkg_resources with importlib.resources
2025-01-23 11:05:45 -05:00
Agrendalath
8b7a771dc4 fix: remove incorrect key type when filtering inaccessible blocks
Returning the list with a 'completion' string was added in 9bc0f85. However,
the `get_accessible_sequences` method expects a list of dicts with an 'id' key.
2025-01-23 17:53:36 +05:30
David Ormsbee
9a6cdbf8e2 perf: upgrade XBlock to 5.1.1 for caching unknown tags
This should improve performance for courseware operations when there is
content that doesn't map to any existing XBlocks in the system. This
usually happens to old courses when custom XBlock types are deprecated
and removed, or when a course is imported from another instance with a
different set of installed XBlocks.
2025-01-22 14:36:50 -05:00
Justin Hynes
92bc0fa763 feat: update default retirement states in devstack config (#36153)
We would like new devstack instances to better support the user retirement pipeline out of the box after provisioning. The first step is to update the default list of retirement states devstack is configured to add/use.
2025-01-22 13:28:45 -05:00
Ataf Fazledin Ahamed
241997ec88 fix: Replaced mktemp with a safer alternative mkstemp
* fix: Replaced `mktemp` with a safer alternative `mkstemp`

Signed-off-by: fazledyn-or <ataf@openrefactory.com>

---------

Signed-off-by: fazledyn-or <ataf@openrefactory.com>
Co-authored-by: Edward Zarecor <ezarecor@tcril.org>
Co-authored-by: Farhaan Bukhsh <farhaan@opencraft.com>
2025-01-22 23:18:31 +05:30
Feanil Patel
0d042fb98b Merge pull request #36147 from openedx/repo-tools/upgrade-python-requirements-14ec4b9
chore: Upgrade Python requirements
2025-01-22 12:28:09 -05:00
Marlon Keating
2411563221 Merge pull request #36150 from openedx/marlonkeating/upgrade-edx-enterprise-14ec4b9
feat: Upgrade Python dependency edx-enterprise
2025-01-22 09:07:28 -08:00
Marlon Keating
6e113165b8 Merge branch 'master' into marlonkeating/upgrade-edx-enterprise-14ec4b9 2025-01-22 08:38:07 -08:00
edX requirements bot
c1398b2bca chore: Upgrade Python requirements 2025-01-22 10:52:01 -05:00
David Ormsbee
c762c1f695 perf: update edx-when to 2.5.1 for performance fix
This addresses an issue where get_schedule_for_user was making an
excessive number of calls to the database.
2025-01-22 10:50:04 -05:00
marlonkeating
ed438fa227 feat: Upgrade Python dependency edx-enterprise
fix: enterprise-customer-support should only return learners from given customer

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2025-01-22 15:38:52 +00:00
andrey-canon
fd74df3857 feat: filter by current site organizations 2025-01-21 16:21:38 -05:00
Katrina Nguyen
14ec4b9ef6 Merge pull request #36145 from openedx/katrinan029/upgrade-edx-enterprise-d018675
feat: Upgrade Python dependency edx-enterprise
2025-01-21 12:13:42 -08:00
katrinan029
e269c13be8 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`
2025-01-21 19:15:56 +00:00
David Ormsbee
d018675968 perf: reduce ORM queries needed for video quality info
The CourseQualityView used to call edx-val's get_video_for_course(),
which would return a fully serialized data structure that included all
encodings and inefficiently serialized them with many n+1 queries. This
is tolerable in a paginated web view, but not when pulling all of a
large courses's videos at once.

Making this change collapsed the number of queries for a large sample
MIT course from over 3000 down to 1.
2025-01-21 12:06:40 -05:00
Feanil Patel
88735f454e Merge pull request #36127 from openedx/feanil/more_terrain_cleanup
fix: Dropping terrain related config and docs.
2025-01-21 11:51:15 -05:00
David Ormsbee
7635b8edcb perf: normalize LMS vs. Studio debug-toolbar settings
This change disables the profiling panel for performance reasons. It's
rarely useful anyway, given the lack of granularity in the data it
displays.

This commit also enables the Cache panel, which is import for tracking
where we're making excessive calls to redis/memcached.
2025-01-21 11:03:01 -05:00
renovate[bot]
824a766fb1 chore(deps): update dependency selenium-webdriver to v4.28.1 (#36141)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-21 10:36:11 +00:00
renovate[bot]
3c74224c8d chore(deps): update dependency eslint-import-resolver-webpack to v0.13.10 (#36140)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-21 10:35:40 +00:00
Robert Raposa
4035aa3487 Revert "refactor: Clean up lms/envs/production.py cruft (#36115)" (#36129)
This reverts commit 15939232d5.
2025-01-17 16:16:38 +00:00
Muhammad Faraz Maqsood
7419ae85f5 chore: upgrade openedx-forum version to 0.1.6 2025-01-17 10:18:57 -05:00
Feanil Patel
43624fd922 fix: Dropping terrain related config and docs.
The terrain app and its stub servers were removed as a part of
https://github.com/openedx/edx-platform/pull/36102 but these last few
things got missed.
2025-01-17 09:04:48 -05:00
Kyle McCormick
15939232d5 refactor: Clean up lms/envs/production.py cruft (#36115)
This is a pure refactoring of lms/envs/production.py, removing several
redundant statements that have accrued over the years as the platform moved
from python-only, to python+json, to python+json+yaml, to today's python+yaml
setup.

Notes on some of the more involved refactorings:

* AWS Locals Load block is handled by the YAML loading at the very top, we
  don't need to re-load it since there were no changes to those settings
  between the YAML loading at the top and this section.

* MKTG_URL_OVERRIDES, we drop doing any overrides and remove it from the merge
  list beacuse the default value in
  lms/envs/common.py is empty.  So the update is a no-op and is the same as just
  loading this data directly from the YAML config.

* CODE_JAIL block, we've been overriding the entire dict if it is in your YAML
  config, so then going through and updating the individual values is not necessary.

* SSL_AUTH_EMAIL_DOMAIN and SSL_AUTH_DN_FORMAT_STRING are not used anywhere in
  the openedx org, looks like they were used by the old `dashboard` djangoapp
  and can probably be deleted but might be used by plugins so not removing for
  now to keep the change backward compatible.

* DEFAULT_FILE_STORAGE, previously two of the braches were no-ops so we only
  keep the one branch we need for when we want to update DEFAULT_FILE_STORAGE
  automatically if AWS keys are set.

Somewhat related to: https://github.com/openedx/open-edx-proposals/issues/587

Co-Authored-By: Feanil Patel <feanil@axim.org>
2025-01-16 15:19:47 -05:00
Chris Chávez
e930bc60b1 feat: Changes in xblock_v2 to support studio_view [FC-0076] (#36029)
Updates to support studio_view (editors) in xblock_v2 iframe.

- Send a message when cancel button is clicked on xblock_v2 iframe only in studio_view
- Send a message when save.end event is notified on xblock_v2 iframe.
- Send notify function in runtime. This is to avoid errors when saving the Xblock
2025-01-16 18:10:59 +00:00
Ihor Romaniuk
8aeaaf4e21 feat: [FC-0070] add message events and styles to the library content page (#35785)
This introduces improvements for XBlock interactions within iframes:

* Add default styles for Library Content that renders in the iframe in the new Studio unit page
* When the `isIframeEmbed` option is enabled, the XBlock sends a `postMessage` to the parent window. When sending such a message, the standard link transition is cancelled and the transition is carried out in the MFE.
2025-01-16 14:05:26 -03:00