After we merged this PR: https://github.com/openedx/edx-platform/pull/33920
this error began popping up in logs:
Unable to load XBlock 'staffgradedxblock'
....
ImportError: cannot import name 'get_course_blocks' from
partially initialized module 'lms.djangoapps.course_blocks.api'
(most likely due to a circular import) ...
The root cause was the new imports of `derived_key` and `BlockKey` into
xmodule/library_content_block.py. Those new imports come from
xmodule/modulestore/store_utilities.py, which runs
`XBlock.load_classes()` at the module level, which fails because we are
still in the process of loading xmodule/library_content_block.
As a solution, we move both `derived_key` and `BlockKey` to
xmodule/util/keys.py. We could potentially move that file to opaque-keys
eventually, depending on how well we think that those concepts generalize.
Also:
* We rename the function from derived_key to derive_key, as
functions should be verbs.
* We combine the first to parameters of derive_key (a source ContextKey
and a source BlockKey) into a single parameter (a source UsageKey). In
my opinion, this makes the function call easier to understand.
replacing non encrypted fields of moodle config model with encrypted ones
Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
undid my auto formatters reordering of the includes, because I'm
assuming that's what the lint-amnesty directives are there for. Best
practice would have a human-written comment explaining why they need to
stay there, but I'm just going have to assume it's correct, Because no
such human-written comment exists.
FIXES: APER-2851
adds a management command to modify certificate templates, with a dry
run option. Inherently unsafe; just as a search and replace on the first
string match.
TODO:
* unit tests
* make sure the multi-line string replacements work via django admin
FIXES: APER-2851
Refactors forgiving JWT code to use username.
Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
Co-authored-by: robrap <robrap@users.noreply.github.com>
refactor learner data transmission audit records to utilize the existing records
Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
Web scrapers do annoying stuff like visit urls they shouldn't know about and cause xblock handlers to break.
I tested this by:
Making sure video transcripts worked as normal while logged in
making sure that I got no 500s in my logs while attempting to view it logged out.
* feat: create DRF endpoint to get course index context
* refactor: update serializers location and added some tests
* refactor: move modulestore usage out of views
* fix: move course index call under bulk_operations
* test: add test to track db and mongo queries
---------
Co-authored-by: ruzniaievdm <ruzniaievdm@gmail.com>