* feat: added notification when response is endorsed or answered
* test: added and fixed test cases
* fix: fixed lint errors
* refactor: changed method name for readibility
* feat: added notification when my response is endorsed
* test: fixed failed test cases
* feat: added setting to disable the survey report banner entirely
* fix: fixed unit test with new setting
* refactor: changed conditions for better code readability
* feat: added exception to stop the report from generating if the setting is set to false
* chore: updated the readme file to include the new setting
* refactor: move survey settings to common and disable admin by setting
* docs: typos in README
Co-authored-by: Tim McCormack <tmccormack@edx.org>
* refactor: set default values to survey report settings
* refactor: rename ENABLE_SURVEY_REPORT setting to SURVEY_REPORT_ENABLE
* test: fix quality tests
---------
Co-authored-by: Alejandro Cardenas <alecar.main@gmail.com>
Co-authored-by: Tim McCormack <tmccormack@edx.org>
* fixed one test to accommodate a slightly modified workflow
* allowed the automated linter to match current standards
Note: as part of this process, I realized a lot of the tests in `programs/tests/test_tasks.py` are somewhat problematic. Some aren't real unit tests (allow calls to something other than the system under test), at least one for that reason it won't run on local at all, and some mock the wrong part of the system or just don't match current flow. I'm not modifying them as part of this, but they should be looked at.
FIXES: APER-3146
To determine whether or not we need to revoke any program certificates, we first run get_revokable_program_uuids. This calls get_certified_programs, which calls get_credentials, which uses the OpenEdx Core utility method get_api_data. get_api_data makes the API call inside a try block, does raise_for_status also inside the try block, and then catches the exception, logs it, and returns an empty result to the caller.
This means that on a failure to call the credentials API, get_credentials can’t tell the difference between a failure to hit the API (because credentials is, as it sometimes is during a notify_programs run, overloaded), or a learner with no program certificates. In this particular case, this is absolute failure, incorrect behavior.
* Adds a new flag, `raise_on_error` which will make `get_api_data` log the exception and then re-raise the HTTPError, defaulting to false in order to avoid changing the behavior on any other callers
* Also: my editor reformatted all of the touched files to our modern code standards, and it seemed appropriate to let it do that.
* Also: added type hints in some cases, because they helped me write the code and debug. Our test suite definitely reports mypy results on type errors so we are verifying that hints are correct.
FIXES: APER-3146
* style: drawer-cover color updated for all tagging drawers
* feat: Update TagList component when a tag is updated on Manage tags drawer
* feat: Refactor TagCount to be able to refresh the count
* feat: Sync tag count in units
This reverts commit 4ec70eb98b.
This commit introduced a new setting (`brand_color`) that does not appear to be set and is causing issues with account deletion and other parts of the courseware.
Reverting until we can understand the change better.
* refactor: changed survey report message location and added a new informative sent state
* chore: added Generate and Send text on button
* chore: added comment to new state column and added reference to static jquery.
* fix: fixed non Attribute error when a report hasn't been sent yet
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.
* docs: add more details to the survey report README
* docs: improve the doc with numbered steps, bold and capitalize words
* docs: add more information about the survey report banner