Commit Graph

1258 Commits

Author SHA1 Message Date
Robert Raposa
8ef8b35a54 docs: update toggle docs
A variety of updates were made to improve the toggle documentation:
* Added comments to help ensure that the waffle(), waffle_switches(),
  waffle_flags() anti-pattern won't be contagious (copied).
* Some minor toggle_description updates.
* Removed empty toggle_target_removal_date annotations for
  non-temporary toggles.
* Removed empty optional toggle_warnings annotations.
* Removed empty optional toggle_tickets annotations.
* Removed deprecated toggle_category, toggle_status,
  and toggle_expiration_date annotations.
* Fixed some indents, use cases, and implementations.

ARCHBOM-1721
2021-04-01 21:58:29 -04:00
Bianca Severino
73c5866678 fix: remove proctored exam resume waffle flag 2021-03-31 14:14:09 -04:00
Simon Chen
4c5d56ef06 MST-682 Add external_user_key to the student profile CSV (#27091)
* MST-682 Add external_user_key to the student profile CSV
This is a request from some Masters school partners. They would like to download the student enrolled list with the Masters external_user_key data referenced. This way, the schools can properly match the students enrolled in the course with the students enrolled through Masters enrollment system
2021-03-22 14:25:34 -04:00
Bianca Severino
d7c944c387 Allow get_proctoring_escalation_email to use a course key object 2021-03-19 11:24:27 -04:00
Sarina Canelake
2342f04447 Merge pull request #26435 from open-craft/shimulch/bb-3624-upstream
Fix missing email context values and pass site configuration to better multi-site customization
2021-03-19 08:42:38 -04:00
Awais Qureshi
05a5f5954b refactor: remove unused imports. 2021-03-19 10:15:59 +00:00
Shimul Chowdhury
e942f12adc Add missing context platform_name and contact_mailing_address. And pass
site configuration to email context.
2021-03-19 10:05:49 +06:00
Justin Hynes
0b22c70248 MICROBA-1011 | Reduce use of Certificates models accessed directly in Instructor Dashboard djangoapp
[MICROBA-1011]
- When creating bulk allowlist entries make the tool use the `is_on_allowlist` certificate API function over accessing the CertificateWhitelist model methods directly
- When creating bulk allowlist entries make the tool use the `create_or_update_allowlist_entry` certificate API function over using CertificateWhitelist model/Django ORM directly
2021-03-15 12:00:56 -04:00
Michael Terry
c697acec2b Merge pull request #26927 from edx/mikix/ace-braze
feat: update to edx-ace 1.0.0
2021-03-12 11:05:30 -05:00
Michael Terry
570a869bd3 feat: update to edx-ace 1.0.0
The new version switches how you specify recipients, to use
lms_user_id instead of usernames.

AA-489
2021-03-12 10:25:54 -05:00
Saad Yousaf
b6b8c3b8d6 [TNL-7970] - Convert anonymized id report code to an instructor task. (#26778)
Co-authored-by: SaadYousaf <saadyousaf@A006-00314.local>
2021-03-11 11:48:35 +05:00
Justin Hynes
32685a7999 MICROBA-1025 | Update cert_whitelist.py management command
[MICROBA-1025]
- Update management command to use the same logic that the Instructor Dashboard uses
- Fix bug in management command where processing stopped when encountering a user that did not exist
- Add more logging
- Add and update tests where needed
2021-03-09 14:45:44 -05:00
Jawayria
1a2245cd19 Merge pull request #26560 from edx/jawayria/bom-2352-6
BOM-2352: Removed unused imports from lms/djangoapps/{grades, instruc…
2021-03-09 19:04:03 +05:00
Jawayria
b31c18d6db BOM-2352: Removed unused imports from lms/djangoapps/{grades, instructor} 2021-03-09 17:25:54 +05:00
Kyle McCormick
9aefd6f986 style: django-not-configured is not a sensible lint-amnesty value (#26862)
django-not-configured is an error raised by pylint (with
the pylint-django plugin) when it's not correctly configured.

We should not be applying lint amnesty for such a violation.
2021-03-05 08:11:58 -05:00
Justin Hynes
a3a05bc440 MICROBA-1038 | Don't check enrollment status when removing allowlist entries
[MICROBA-1038]
- Today, we check if a learner is actively enrolled in a course-run before we add or remove them from the Instructor Dashboard allow list. We ran into an issue where we couldn't remove an entry from the list because the learner is no longer actively enrolled in the course-run. Update instructor dashboard logic to only check enrollment status when _adding_ a learner to the allow list.
2021-03-04 13:44:45 -05:00
Justin Hynes
05c82810e0 MB-1023 | Fix defect when removing allowlist entry on instructor dashboard
[MB-1023]
- Fix issue from recent refactor. Verify certificate is not none before attempting to invalidate the certificate.
- Add more logging
2021-03-03 13:14:01 -05:00
Sarina Canelake
e15e372233 Merge pull request #26772 from edx/sarina/DEPR-142-TNL-7522
Remove the "role of users being enrolled" field from Instructor Dashboard
2021-03-03 08:57:16 -05:00
Justin Hynes
07837cf54e MICROBA-1024 | Move the allowlist and blocklist checks to certificates app
[MICROBA-1024]
- Move some of the recently added logic from the instructor app to the certificates app
- Attempt to not use other certificate models directly in the code I am touching, moving this logic to certificates as well.
2021-03-02 14:58:20 -05:00
sarina
173bbce500 feat!: Remove the "role of users being enrolled" field from Instructor Dashboard
See DEPR-142
2021-02-28 18:40:16 -05:00
Justin Hynes
0de1d2b89a MICROBA-908 | Prevent overlap of allowlist and blocklist [WIP]
[MICROBA-908]
- When adding a learner to the allowlist we now check if they have an invalidated certificate on the blocklist
- Refactor some pieces of the Certificate Invalidation flow
- Make it so an error message is displayed when trying to add someone to CertificateInvalidation list if they already appear on the Allowlist
- Add support to pass back and display an error message to Instructor Dashboard UI if a learner already appears on the certificate invalidation list when attempting to create certificate exceptions in bulk
- Add python tests for backend changes
- Disable xss linting warnings in certificate_bulk_whitelist.js (checked with security group first)
2021-02-24 09:25:13 -05:00
Michael Terry
23f34031d1 Merge pull request #26663 from edx/mikix/enable-schedules
feat: turn on schedule creation by default
2021-02-23 14:34:11 -05:00
Matthew Carter
9dc6ab1c7d Merge pull request #20955 from open-craft/samuel/se-1168-ora-summary
SE-1168 [FAL-92] implement ORA process summary report csv
2021-02-23 12:47:19 -05:00
Michael Terry
74887aa216 feat: turn on schedule creation by default
This commit removes several waffle toggles that have been enabled
on edx.org for years. It's time to remove the rollout gating for
these features and enable them by default.

This doesn't directly change any behavior. But it does create new
database objects by default now and allows for enabling other
schedule based features more easily.

Specifically, the following toggles were affected.

schedules.create_schedules_for_course
- Waffle flag removed as always-enabled
- We now always create a schedule when an enrollment is created

schedules.send_updates_for_course
- Waffle flag removed as always-enabled
- Course update emails are sent as long as the ScheduleConfig
  allows it.
- This is not a change in default behavior, because ScheduleConfig
  is off by default.

dynamic_pacing.studio_course_update
- Waffle switch removed as always-enabled
- Course teams can now always edit course updates directly in Studio

ScheduleConfig.create_schedules
ScheduleConfig.hold_back_ratio
- Model fields for rolling out the schedules feature
- Schedules are now always created
- This commit only removes references to these fields, they still
  exist in the database. A future commit will remove them entirely

This commit also adds a new has_highlights field to CourseOverview.
This is used to cache whether a course has highlights, used to
decide which course update email behavior they get. Previously every
enrollment had to dig into the modulestore to determine that.
2021-02-23 12:34:02 -05:00
Sarina Canelake
e3b0bffa50 Revert "Remove the "role of users being enrolled" field from Instructor Dashboard" 2021-02-23 09:03:31 -05:00
Samuel Walladge
f43f1635df Add new functionality to generate ora summary report 2021-02-23 11:52:50 +10:30
sarina
406176b9e6 feat!: Remove the "role of users being enrolled" field from Instructor Dashboard
See DEPR-142
2021-02-22 16:18:12 -05:00
usamasadiq
96f0915b0f Fixed new pylint warnings.
use generator in any/all()
disable not-callable warnings
disable no-member warnings
Suppressed smaller pylint warnings
Pin edx-proctoring==3.5.0
2021-02-22 16:36:53 +05:00
M. Zulqarnain
36748ff78f pyupgrade on LMS instructor app (#26533) 2021-02-22 12:58:35 +05:00
Aarif
1ead9f684c replaced unittest assertions pytest assertions (#26546) 2021-02-18 18:01:41 +05:00
Bianca Severino
1d667e8b0f Add onboarding status view to instructor dashboard 2021-02-11 15:32:13 -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
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
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
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
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
usamasadiq
7bbde8f0f5 Applied pylint-amnesty 2021-02-08 13:00:22 +05:00
Feanil Patel
0221d6a081 feat: Add ratelimitng to the get_anon_ids api endpoint.
This endpoint can be computationally intensive and so we want to limit
the number of concurrent executions so that it doesn't overload the
server.
2021-02-04 14:03:15 -05:00
Felipe Montoya
b3cbc404d9 Merge pull request #26046 from open-craft/danielf/BB-3502
[BTR-53] [BB-3502] Misuse of urljoin in Gradebook URL from Instructor Panel
2021-02-03 12:59:21 -05:00
M. Zulqarnain
0213fde968 BOM-2281 : Pylint amnesty for grades,gating and instructor app (#26343)
* pyint amnesty for grades,gating and instructor app
2021-02-03 18:14:35 +05:00
Ahtisham Shahid
428402e370 changed instructor dashboard waffle type form course to legacy (#26128)
* changed instructor dashboard waffle type form course to legacy
2021-01-27 13:10:38 +05:00
Awais Jibran
eeed906017 Merge pull request #25994 from edx/aj/bulk-email-provide-logo-from-bkend
Provide logo URL from the backend
2021-01-26 15:02:56 +05:00
Michael Roytman
0912b44254 Merge pull request #26147 from edx/mroytman/MST-545-pass-proctoring-improvements-toggle-edx-proctoring
pass value of EXAM_RESUME_PROCTORING_IMPROVEMENTS feature toggle to ed…
2021-01-25 12:21:55 -05:00
Bianca Severino
c95dc59356 Add function to InstructorService to retrieve proctoring_escalation_email 2021-01-25 10:05:27 -05:00
Michael Roytman
71cc2e18e5 pass value of EXAM_RESUME_PROCTORING_IMPROVEMENTS feature toggle to edx-proctoring Javascript via the student-proctored-exam-container div 2021-01-25 09:59:44 -05:00
spokerman12
8259b82c63 Added unit test for subdirectory Gradebook MFE deploy 2021-01-22 10:14:04 -04:00
Daniel Francis
f53f5df505 Misuse of urljoin in Gradebook URL from Instructor Panel 2021-01-20 09:44:35 -04:00
Calen Pennington
f1a9132308 Fix a flaky test error that happened if the factory generated usernames rolled over from 999 to 1000 2021-01-13 10:40:25 -05:00