Commit Graph

12296 Commits

Author SHA1 Message Date
Aarif
944df92787 replaced unittest assertions pytest assertions (#26548) 2021-02-19 15:58:45 +05:00
Aarif
87fbbc7f3b replaced unittest assertions pytest assertions (#26547) 2021-02-19 12:36:28 +05:00
Aarif
a332aac1f6 replaced unittest assertions pytest assertions (#26541) 2021-02-19 12:27:11 +05:00
Aarif
a8b9733654 replaced unittest assertions pytest assertions (#26544) 2021-02-19 11:59:44 +05:00
Aarif
0112339b20 replaced unittest assertions pytest assertions (#26543) 2021-02-19 11:58:27 +05:00
Sarina Canelake
ac999ec1fc Merge pull request #25984 from naeem91/patch-1
Fix PY3 incompatible division
2021-02-18 14:57:38 -05:00
Calen Pennington
64c94174ed fix: Standardize the name of the education field in Segment
The UserProfile fields level_of_education is named education in the identify call we send to segment on registration. This fixes it so that that same field name is used when we send identify events when user profiles change.
2021-02-18 14:25:09 -05:00
Christie Rice
6b0bc6389a MICROBA-918 Update allowlist check to handle more signals (#26606) 2021-02-18 10:48:53 -05:00
Aarif
d2a147bb47 replaced unittest assertions pytest assertions (#26542) 2021-02-18 19:14:41 +05:00
Aarif
f35ff6a1eb replaced unittest assertions pytest assertions (#26540) 2021-02-18 19:13:47 +05:00
Michael Terry
139a0f6ee1 Merge pull request #26290 from edx/mikix/effort-estimation
AA-614: Add initial effort estimation block transformer
2021-02-18 08:52:55 -05:00
Michael Terry
1b9119859e AA-614: Add initial effort estimation block transformer 2021-02-18 08:31:19 -05:00
Aarif
1ead9f684c replaced unittest assertions pytest assertions (#26546) 2021-02-18 18:01:41 +05:00
Aarif
906b6f7fed replaced unittest assertions pytest assertions (19) (#26545) 2021-02-18 18:00:30 +05:00
Matt Tuchfarber
6efc6e1e6a Merge pull request #26586 from edx/tuchfarber/allow_db_args
feat: Allow cert allowlist mgmt cmd to use db args
2021-02-16 15:45:58 -05:00
Matt Tuchfarber
0374c3f62b Update help text 2021-02-16 15:16:52 -05:00
Matt Tuchfarber
d380d85f5c feat: Allow cert allowlist mgmt cmd to use db args
The management command to generate certificates for users on a course's
allowlist (formerly whitelist) now allows for database arguments to
allow it to be called outside of a manual shell.
2021-02-16 14:49:26 -05:00
Carla Duarte
3a2b537cd5 Merge pull request #26582 from edx/ciduarte/AA-664
AA-664: add JwtAuthentication to course home api
2021-02-16 14:11:19 -05:00
Carla Duarte
dcb6bbc262 AA-664: add JwtAuthentication to course home api 2021-02-16 12:21:16 -05:00
Usman Khalid
62ed654b31 Convert LTIModule into LTIBlock. (#25713) 2021-02-16 09:09:13 -05:00
SaadYousaf
50e71479ee [TNL-7729] - Add check to discussion rest API to prevent users in blackout period. 2021-02-16 14:08:56 +05:00
Olivia Ruiz-Knott
5c95258115 Merge pull request #26461 from edx/ork/MICROBA-989_notify-credentials-takes-usernames
feat: allow notify_credentials to take a list of usernames
2021-02-12 10:45:15 -05:00
Bianca Severino
1d667e8b0f Add onboarding status view to instructor dashboard 2021-02-11 15:32:13 -05:00
Feanil Patel
4cef913a85 Merge pull request #26489 from edx/feanil/flaky_anon_id_test
test: Don't add a delta to ensure we get rate limited.
2021-02-11 14:16:07 -05:00
David Ormsbee
691472e475 [feat]: Don't use Mathjax if an HTMLBlock has no math. (#26478)
Mobile apps load HTML (and other) XBlocks individually using the
render_xblock endpoint. This is an attmept to reduce the number
of requests and JS processing needed to do so by detecting when
we have math content in HTMLBlocks and only adding the Mathjax
resources when necessary.

This is controlled by the "courseware.optimized_render_xblock"
CourseWaffleFlag. For maximum safety, we currently only optimize
in this way when directly hitting HTMLBlocks, and not for
ProblemBlock or VerticalBlock.

This was made as part of edX's Hackathon XXV.
2021-02-11 13:31:17 -05:00
Feanil Patel
6f1691e5b6 test: Don't add a delta to ensure we get rate limited.
The rate limiting library computes the rate limit by chunking time since
the epoch into chunks of whatever your period is. It then adds some
consistent offset based on your key.  This means that at certain times,
you are closer to the end of your rate limit time period than others.
So moving 1 minute into the future would put you into the next time
chunk and your rate limit would be reset.

I updated the test to test rate limit at the same time as the initial
call to ensure that we don't end up on the other side of a time chunk
boundary by accident.  We were seeing times in CI where it
would occasionally fail because time chunking wasn't in our favor.
2021-02-11 11:32:49 -05:00
Aarif
01ac3c2ed3 replaced unittest assertions pytest assertions (#26308) 2021-02-11 17:41:41 +05:00
Bianca Severino
2e72791491 Create command to update expiration_date for old SoftwareSecurePhotoVerification entries (#26471) 2021-02-10 16:55:51 -05:00
alangsto
9104983369 update edx-proctoring version (#26472)
updated for quality
2021-02-10 13:41:17 -05:00
Manjinder Singh
cd60646926 fix: Switch anonymous user ID hash from md5 to shake (#26198)
Now that we always return an existing value from the DB rather than trusting that ID generation is deterministic and constant over time, we're free to change the generation algorithm.

Our long term goal is to switch to random IDs, but we need to first investigate the uses of save=False. In the meantime, this is a good opportunity to move away from MD5, which has a number of cryptographic weaknesses. None of the known vulnerabilities are considered exploitable in this location, given the limited ability to control the input to the hash, but we should generally be moving away from it everywhere for consistency.

This change should not be breaking even for save=False callers, since those calls are extremely rare (1 in 100,000) and should only occur after a save=True call, at which point they'll use the stored value. Even if this were not true, for a save=False/True pair of calls to result in a mismatch in output, the first of the calls would have to occur around the time of the deploy of this code.

Co-authored-by: Tim McCormack <tmccormack@edx.org>
 
Co-authored-by: Tim McCormack <tmccormack@edx.org>
2021-02-10 07:37:27 -05:00
oliviaruizknott
0533ecc814 feat: allow notify_credentials to take a list of usernames 2021-02-09 17:04:21 -05:00
Feanil Patel
a482bc15e3 Merge pull request #26441 from edx/feanil/make_rate_limit_errors_429s
Make rate limit errors 429s instead of 403s
2021-02-09 15:07:22 -05:00
Alexander J Sheehan
e9175c2338 Merge pull request #26444 from edx/alex-sheehan-edx/use-the-right-integrated-channels-task
replace bulk transmission task to intended single learner task
2021-02-09 12:28:50 -05:00
Alexander Sheehan
aaa375077c replace bulk transmission task to intended single learner task 2021-02-09 11:55:22 -05:00
Christie Rice
7db147e06a Fix lint-amnesty warnings (#26412) 2021-02-09 10:20:46 -05:00
Christie Rice
997e31b56b MICROBA-918 Check the allowlist when regenerating certificates, and stop incidentally modifying the certificate invalidation list (#26439) 2021-02-09 09:47:33 -05:00
Carla Duarte
7f7edd93c7 Merge pull request #26440 from edx/ciduarte/AA-590
AA-590: pass translated tab titles to MFE
2021-02-09 08:57:10 -05:00
usamasadiq
1e2aa1dec5 Apply manesty to convention warnings 2021-02-09 17:09:19 +05:00
Carla Duarte
00a025f073 AA-590: pass translated tab titles to MFE 2021-02-08 17:00:33 -05:00
Tim McCormack
80a4437f33 fix: Always save generated anonymous user ID in DB; ignore save=False (#26399)
This deprecates `save=False` for several functions and removes all known
usages of the parameter but does not actually remove the parameter.
Instead, it will emit a deprecation warning if the parameter is used.
We can remove the parameter as soon as we feel sure nothing is using it.

Now that we have refactored `anonymous_id_for_user` to always prefer
retrieving an existing ID from the database -- and observed that only a
small fraction of calls pass save=False -- we can stop respecting
save=False. This opens the door for future improvements, such as generating
random IDs or switching to the external user ID system.

Metrics: I observe that 1 in 16 requests for new, non-request-cached
anon user IDs are made with save=False. But 71% of all calls are served
from the request cache, and 99.7% of the misses are served from the DB.
save=False only appear to come from intermittent spikes as reports are
generated and are low in absolute number.

Also document usage/risk/rotation of secret in anonymous user ID
generation as indicated by `docs/decisions/0008-secret-key-usage.rst`
ADR on `SECRET_KEY` usage.

ref: ARCHBOM-1683
2021-02-08 19:16:05 +00:00
Feanil Patel
cd3e4353b1 feat: Add a 403 and 429 handler.
See context here: https://django-ratelimit.readthedocs.io/en/latest/cookbook/429.html#context

For now we continue to fall back to django's default 403 handler for 403
but provide a new 429 template that we use for ratelimit exceptions.

This commit also updates a logistration test that relied on the old 403
behavior of django-ratelimit instead of the newly added 429 behavior.
2021-02-08 14:03:26 -05:00
Bianca Severino
54505b82c4 Merge pull request #26436 from edx/bseverino/proctoring-check-fix
[MST-645] Account for no enrollment in courseware rules
2021-02-08 13:39:40 -05:00
Carla Duarte
a3f0050c4d Merge pull request #26396 from edx/ciduarte/depr-keys
AA-650: block deprecated keys from course home MFE
2021-02-08 13:27:58 -05:00
Bianca Severino
4fb36709a5 Account for no enrollment in courseware rules 2021-02-08 13:12:52 -05:00
Carla Duarte
8d2d78dc61 AA-650: block deprecated keys from course home MFE 2021-02-08 13:00:36 -05:00
Feanil Patel
03d2d983ea Merge pull request #26392 from edx/feanil/rate_limit_anon_csv
Feanil/rate limit anon csv
2021-02-08 12:05:21 -05:00
Christie Rice
367d2a07c9 Fix lint-amnesty warnings (#26411) 2021-02-08 10:49:32 -05:00
Gábor Boros
dd55860da1 [TSD] [SE-3988] add annotations to instructor plugin settings (#26202)
docs: add annotations to instructor plugin settings
2021-02-08 10:45:26 -05:00
Christie Rice
6e5a9f5f6f MICROBA-918 Move methods to separate certificate generation from celery task to schedule certificate generation. Also standardizes imports. (#26410) 2021-02-08 10:01:04 -05:00
edx-pipeline-bot
930980d732 Merge pull request #26427 from edx/private_to_public_01b389b
Mergeback PR from private to public.
2021-02-08 09:36:23 -05:00