This will ensure that errors raised by these tasks will alert the right
team. `send_course_enrollment_email` is the one I set out to fix, but I
discovered a few others.
I located tasks that were missing decorators by running the following
search and visually inspecting the results, although semgrep might be able
to do better:
```
ack '^@.*task|^@set_code_owner_attribute' cms lms common openedx xmodule --ignore-dir=tests --python
```
Also, add more detailed explanation of why a couple of tasks can't use the
decorator. This should only be an issue on tasks inheriting from
UserTaskMixin, which in practice is just CourseExportTask and
CourseImportTask (and the apparently unused EnrollmentReadTask and
EnrollmentWriteTask), via UserTask.
Adds a dropdown to select the organization. The dropdown will only be activated for users with CourseCreator permission to specific organizations in Studio.
Use cases:
When FEATURES['ENABLE_CREATOR_GROUP'] = True and the user has CourseCreator permission granted, a dropdown will appear with all specific organizations allowed. In case of all_organizations setting is enabled, all organizations will appear in the dropdown.
In case the user is staff, he can create organizations it will work as before
* feat!: update timestamp of catalog-info-changed signal
When producing the catalog-info-changed signal, we
now get the timestamp of the change from modulestore,
rather than relying on the current time at the time
of the event send.
BREAKING CHANGE: This will adjust the meaning of the
time metadata for new catalog-info-changed events.
---------
Co-authored-by: Robert Raposa <rraposa@edx.org>
This is part of Old Mongo removal. Also in this commit:
* fixed 400 error for cms old_style assets
* fix TEST_DATA_SPLIT_MODULESTORE import for test_course_index
* fixed problem with creating some CourseItem with some parent:
we must get the updated parent item before using that parent item
* replaced parent_location with parent argument in ItemFactory due to
error children/parent relation for split modulestore. In all tests with
split modulestore parent argument used
We run atomic-requests in almost all environments (for the lms and cms
anyway) EXCEPT devstack_with_worker. Using a different setting means
that even if you think you are testing with a worker like real deploys
use, you are not actually testing with the data a worker would
actually see.
The removed code also claims that if you run with atomic transactions
and a worker you will deadlock the system. If so edx.org would be
deadlocked at all times and yet is not. The old code was vintage 2015
and its assumptions probably haven't been examined since then.
Current behavior for both old and new exams paths on exam creation is
that the signal fires, the update code kicks off a celery task which
looks for a new exam, and that exam is not found so no actual update
is done. Or the old version is visible but the updated version is not.
By waiting until the change is actually committed, we should find the
new exam when we search for it.
This is currently an invisible bug just because of the large numbers
of updates that working on a course provides, the exam will be correct
unless it was the absolute last thing that was touched, in which case
it will be out of date.