When listing courses for which a user has "staff" level access, bypass
calls to has_access() and use a hopefully more performant and simpler
access pattern that uses only a single ORM query and far less processing
per course.
Caution: this short-circuit implementation does not handle org-level
access grants.
This change introduces a way to help filling form, with the constant we
can specify the order of the countries that should come first. This will
reduce the chance of commiting a mistake while filling form.
Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
This message comes from the content library block transformer,
and has been filling up our logs at a rate of 250k instances/hr.
Since we don't need to see this log message in production any more,
we are lowering it to the DEBUG level.
Currently, LMS uses 3 Celery workers: lms_default_1, lms_high_1 and
lms_high_mem_1. Each Celery worker sends messages to a single queue:
edx.core.default, edx.core.high and edx.core.high_mem, respectively.
The number of child processes per Celery worker is set to 1. Due to
this configuration, any task in a queue blocks all other tasks.
Currently, the Celery check task submitted by the /heartbeat?extended
LMS HTTP API endpoint runs in the default queue. When some slow task
(eg course grades creation) is sent to the default queue, it will
block the Celery check task, which will expire and the heartbeat endpoint
will fail. This patch moves the task to another queue which has
only shorter tasks and in which this problem will not occur.
Use a Django setting for the Celery check task routing key so that
it can be overriden by individual OpenEDX instances via JSON
env files.
* Change around POST code for demographics modal
CSRF tokens were not working on stage when the user does not have an
entry in the demographics db when using the modal. This restructures the
code a bit and hopefully fixes the problem.
* Remove logs
* Rework things into smaller digestable functions
This fixes a misuse of New Relic terminology. Here we are in fact using
custom attributes; custom metrics are a different thing that we may start
using in the future.
This uses the new names introduced in edx-django-utils
3.8.0 (edx/edx-django-utils#59), which we're already using, as
well as updating a few other locations where we incorrectly refer
to New Relic custom metrics instead of custom attributes.
Includes a couple of unrelated lint fixes in a file I modified.
Previously, we'd been avoiding PLS due dates for ORA *sections*.
That is, if a section had only ORA content, we'd not set a PLS
due date for anything in that section.
If any content in that section had non-ORA graded content however,
we would set dates on all subsections, including the ORA one.
This resulted in some ORA-only subsections showing up twice on the
dates tab. So this patch simply brings down the ORA-only check
to a *subsection* level, not a section one.
* Add CSRF tokens to demographics modal PATCH
We have temporarilly copied over the CSRF code from frontend-platform to
use with the demographics modal. This code is most likely temporary and
is not maintained like frontend-platform.