`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
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
* 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
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.
* 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
* 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>
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.
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.
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.
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`
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.
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.
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>
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
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.