Commit Graph

12296 Commits

Author SHA1 Message Date
Awais Jibran
b59b6b4147 Merge pull request #26702 from edx/aj/refactor/using-q-objects
refactor: use q objects when fetching user using an identifier
2021-02-25 15:24:02 +05:00
M. Zulqarnain
65f79ef9b3 BOM-2365 : pyupgrade on static_templates, staticbook and support apps (#26699)
*pyupgrade on static_templates, staticbook and support apps

This reverts commit 1ec2e797a1.

* Apply suggestions from code review

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
2021-02-25 14:37:09 +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
Christie Rice
57f9005e57 MICROBA-918 Add allowlist check (#26584) 2021-02-24 09:07:04 -05:00
Kyle McCormick
558d2eb52c refactor: centralize learning MFE URL-building logic (#26689)
In preparation for switching LMS/Studio over
from serving legacy courseware URLs in certain
places (for example, resume_course_url) to serving
learning micro-frontend URLs.

TNL-7796
2021-02-24 08:50:15 -05:00
Awais Jibran
fa44c24796 refactor: use q objects when fetching user using an identifier 2021-02-24 15:09:21 +05:00
Awais Jibran
950633a9df refactor: use q objects when fetching user using an identifier #26683 2021-02-24 12:05:38 +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
Cory Lee
1ec2e797a1 Revert "pyupgrade on static_templates, staticbook and support apps (#26646)" (#26685)
This reverts commit a235425ac3.
2021-02-23 13:01:16 -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
Jawayria
b3b0b083d2 BOM-2352: Removed unused imports from lms/djangoapps/{certificates, commerce, course_api} 2021-02-23 19:38:25 +05:00
Jawayria
0491f72c1d BOM-2352: Removed unused imports from lms/djangoapps/{badges, branding, bulk_email, ccx} 2021-02-23 19:37:18 +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
M. Zulqarnain
42fc6aef03 Upgrade django-ipware (#24827) 2021-02-23 18:14:17 +05:00
Jawayria
10e9fc5b13 BOM-2352: Removed unused imports from lms/djangoapps/{lti_provider, mobile_api, teams} 2021-02-23 17:23:47 +05:00
Jawayria
7285ae5151 BOM-2352: Removed unused imports from lms/djangoapps/{instructor_analytics, instructor_task, learner_dashboard} 2021-02-23 17:21:42 +05:00
Jawayria
4303e5c77a Merge pull request #26559 from edx/jawayria/bom-2352-5
BOM-2352: Removed unused imports from lms/djangoapps/{email_marketing…
2021-02-23 16:09:40 +05:00
Jawayria
0e621d3289 Merge pull request #26538 from edx/jawayria/bom-2352-3
BOM-2352: Removed unused imports from lms/djangoapps/{course_blocks, …
2021-02-23 16:09:22 +05:00
M. Zulqarnain
0fdb3fce9a pyupgrade on survey, teams and tests apps (#26647) 2021-02-23 15:50:22 +05:00
M. Zulqarnain
a235425ac3 pyupgrade on static_templates, staticbook and support apps (#26646) 2021-02-23 12:35:53 +05:00
Aarif
c828beb5d1 replaced unittest assertions pytest assertions (#26549) 2021-02-23 10:24:42 +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
Kyle McCormick
6d78f6aab2 fix: staff debug actions depended on legacy courseware URL (#26658)
The Staff Debug Actions didn't work in the Learning MFE
because the underlying JS depended on the URL being
formatted as /courses/<course_key>/... in order to
parse out the course key. This worked in the legacy
experience, but breaks in the chromeless xblock view,
which is rendered under the URL /xblock/<usage_key>/...

The fix is to explicitly pass the course key into the
templated courseware HTML as a data attribute.

TNL-7955
2021-02-22 15:14:31 -05:00
Michael Roytman
0b624bdb71 Merge pull request #26637 from edx/mroytman/MST-617-bump-version-edx-proctoring-3.6.0
[MST-614] bump version of edx-proctoring to 3.6.0
2021-02-22 13:26:37 -05:00
Jawayria
bd08f0d755 BOM-2352: Removed unused imports from lms/djangoapps/{email_marketing, experiments} 2021-02-22 21:47:23 +05:00
Jawayria
a383845b01 BOM-2352: Removed unused imports from lms/djangoapps/{course_blocks, course_goals, course_home_api, courseware} 2021-02-22 21:44:42 +05:00
Matthew Piatetsky
789af8d4ac Merge pull request #26409 from edx/AA-304
[AA-304] Create backend for three day streak celebration
2021-02-22 11:19:39 -05:00
Matt Tuchfarber
5345466e31 Merge pull request #26622 from edx/tuchfarber/remove_pii_from_mgmt_cmd_cfg
Update mgmt cmds to use user_ids instead of PII
2021-02-22 11:04:49 -05:00
Matthew Piatetsky
3b45a72b8e Create backend for three day streak celebration
This feature uses the first_day_of_streak, last_day_of_streak and last_streak_celebration fields to determine whether the user should see a celebration.
AA-304
2021-02-22 10:50:33 -05:00
Matt Tuchfarber
55d9e18495 Update mgmt cmds to use user_ids instead of PII 2021-02-22 10:30:35 -05:00
Michael Roytman
71456cb2a4 feat: Install version 3.6.0 of the edx_proctoring library into edx-platform.
This release adds a new permission check when rendering the practice proctored exam view. If a learner is not in a paid enrollment track, the learner will no longer be able to use proctoring software in a practice proctored exam. As with other proctored exams, learners not in a paid enrollment track will see the exam content. This uses the 'can_take_proctored_exam' permission.
2021-02-22 10:23:36 -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
Usama Sadiq
dd4ee68f2d Merge pull request #26555 from edx/usamasadiq/bom-2361-pyupgrade
Ran pyupgrade on lms/djangoapps
2021-02-22 16:22:55 +05:00
Usama Sadiq
9109f3227e Merge pull request #26565 from edx/usamasadiq/bom-2362-pyupgrade
Ran pyupgrade on lms/djangoapps
2021-02-22 16:22:43 +05:00
Usama Sadiq
39171cbdc6 Merge pull request #26567 from edx/usamasadiq/bom-2363-pyupgrade
Ran pyupgrade on lms/djangoapps
2021-02-22 15:55:05 +05:00
Usama Sadiq
32946933db Merge pull request #26522 from edx/usamasadiq/bom-2356-pyupgrade
Ran pyupgrade on lms/djangoapps
2021-02-22 15:44:59 +05:00
M. Zulqarnain
16f600910b pyupgrade on lms edxnotes,email_marketing,experiments apps (#26531) 2021-02-22 15:42:32 +05:00
edX requirements bot
f33f12bbea BOM-2358 : Pyupgrade in dashboard, debug, discussion apps (#26529)
* Python code cleanup by the cleanup-python-code Jenkins job.

This pull request was generated by the cleanup-python-code Jenkins job, which ran
```
cd lms/djangoapps/dashboard; find . -type f -name '*.py' | while read fname; do sed -i 's/  # lint-amnesty, pylint: disable=super-with-arguments//; s/  # lint-amnesty, pylint: disable=import-error, wrong-import-order//; s/  # lint-amnesty, pylint: disable=wrong-import-order//' "$fname"; done; find . -type f -name '*.py' | while read fname; do pyupgrade --exit-zero-even-if-changed --py3-plus --py36-plus --py38-plus "$fname"; done; isort --recursive .
```

The following packages were installed:
`pyupgrade,isort`

* feedback done

Co-authored-by: Zulqarnain <muhammad.zulqarnain@arbisoft.com>
2021-02-22 15:42:21 +05:00
M. Zulqarnain
e505d99237 pyupgrade on lms gating and grades apps (#26532) 2021-02-22 12:58:41 +05:00
M. Zulqarnain
36748ff78f pyupgrade on LMS instructor app (#26533) 2021-02-22 12:58:35 +05:00
M. Zulqarnain
f4a5af29d3 pyupgrade in program_enrollments (#26597) 2021-02-22 12:58:16 +05:00
M. Zulqarnain
b6a2b91dd5 pyupgrade on rss_proxy and shoppingcart (#26628) 2021-02-22 12:58:09 +05:00
usamasadiq
f9cfbf027c Ran pyupgrade on lms/djangoapps
Ran pyupgrade on lms/djangoapps/lms_xblock
Ran pyupgrade on lms/djangoapps/lti_provider
2021-02-20 21:46:03 +05:00
alangsto
f88181c3c8 update context key/value pair being used for approved email (#26635) 2021-02-19 14:15:09 -05:00
Calen Pennington
b7090ecf42 Merge pull request #26621 from cpennington/education-field-name
fix: Standardize the name of the education field in Segment
2021-02-19 10:17:21 -05:00
usamasadiq
dc36d0bfe8 Ran pyupgrade on lms/djangoapps
Ran pyupgrade on lms/djangoapps/mailing
Ran pyupgrade on lms/djangoapps/mobile_api
Ran pyupgrade on lms/djangoapps/monitoring
2021-02-19 17:47:37 +05:00
usamasadiq
3f1df8eb2a Ran pyupgrade on lms/djangoapps
Ran pyupgrade on lms/djangoapps/instructor_analytics
Ran pyugprade on lms/djangoapps/instructor_task
Ran pyupgrade on lms/djangoapps/learner_dashboard
2021-02-19 17:30:59 +05:00
usamasadiq
3d1f3cea64 Ran pyupgrade on lms/djangoapps/course_blocks
Ran pyupgrade on lms/djangoapps/course_goals
Ran pyugprade on lms/djangoapps/course_home_api
2021-02-19 16:29:52 +05:00