Commit Graph

4470 Commits

Author SHA1 Message Date
Usama Sadiq
32a4c70bef refactor: ran pyugprade on openedx/core/djangoapps/cors_csrf (#26844) 2021-03-12 16:35:43 +05:00
M. Zulqarnain
6286de8bd1 refactor: pyupgrade on ace_common, api_admin, auth_exchange (#26782) 2021-03-12 14:15:03 +05:00
Carla Duarte
dbf2b86f25 Merge pull request #26928 from edx/ciduarte/hack
AA-671: Course Home MFE Progress Tab API cleanup
2021-03-11 16:09:48 -05:00
Carla Duarte
99f73312b8 Progress Tab 2021-03-11 15:43:58 -05:00
Usman Khalid
23d1e5b654 Remove unused RawDescriptor and EmptyDataRawDescriptor. 2021-03-11 22:20:33 +05:00
stvn
435f2a3f79 Merge PR #26718 bd03/api/init
* Commits:
  feat: Add discussions API endpoint [BD-03]
  docs: Add ADR for DiscussionsConfiguration HTTP API [BD-03]
2021-03-11 00:17:16 -08:00
Matt Tuchfarber
09bb25bbcd exp: Add logging to course cert availability date
I believe there to be a race condition here that only manifests in a
non-devstack environment. Adding some logging to better diagnose.
2021-03-10 17:01:45 -05:00
David Ormsbee
8aa056e230 perf: Instrument all learning_sequences API calls.
This will make it possible to make a New Relic dashboard for the
learning_sequences API calls that tracks call performance across
different transactions (by querying Spans). Our goal would be to
offer SLAs around 99th percentile performance.

Course IDs and User ID metrics are also added, so that we can see
outliers in Span reporting, for later investigation.
2021-03-10 10:19:30 -05:00
Syed Muhammad Dawoud Sheraz Ali
4d58626fd4 fix: allow inactive users to submit support tickets (#26933) 2021-03-10 19:43:49 +05:00
stvn
054f4ac828 feat: Add discussions API endpoint [BD-03] 2021-03-10 01:01:53 -08:00
stvn
747a049420 docs: Add ADR for DiscussionsConfiguration HTTP API [BD-03] 2021-03-10 01:01:16 -08:00
Adeel Khan
725cd3f083 Fix button/title text for;
1) Account activation email.
2) Password reset email.
3) Password reset success.

VAN-272
2021-03-10 00:47:49 +05:00
David Ormsbee
f5b74fcf31 feat: Backfill and Django Admin for Learning Sequence Outline
* Adds the backfill_course_outlines management command to contentstore
* Adds a read-only Django admin interface to learning_sequences for the
  support team and debugging.
* Adds two new functions to the learning_sequences public API:
  key_supports_outlines and get_course_keys_with_outlines

The learning_sequences app isn't supposed to know about contentstore or
modulestore, as it's intended to be extracted out of edx-platform in the
long term. Therefore, the backfill_course_outlines command is in
contentstore, and not learning_sequences.

This work was tracked in TNL-7983, but it also fixes a bug where we were
trying to generate course outlines for libraries (TNL-7981).

All Open edX instances upgrading to Lilac should run the
backfill_course_outlines command as part of their upgrade process.
2021-03-09 09:05:57 -05:00
David Ormsbee
6a00878f59 fix: learning_sequences missing courses now return 404 (not 500)
We weren't properly catching the CourseOutlineData.DoesNotExist error
before this commit. TNL-7979
2021-03-09 09:05:57 -05:00
Kyle McCormick
9b37e7d0fe refactor: centralize checks for canonical courseware experience & URL (#26815)
Centralize the logic for choosing between
MFE and Legacy-frontend courseware within
three new functions:
* courseware_mfe_is_active
* courseware_mfe_is_visible
* courseware_legacy_is_visible

This allows us to create another new function:
* get_courseware_url
which can be called anywhere in LMS/Studio
to get the canonical URL to courseware
content (whether it be MFE or Legacy).

In future commits we we begin using
get_courseware_url throughout the platform.

TNL-7796
2021-03-08 15:24:16 -05:00
Felipe Montoya
72fba562f8 Merge pull request #26477 from eduNEXT/MJG/Change_max_uername_len
feat: Changed username max_length to the specified by django
2021-03-08 15:15:49 -05:00
Raul Gallegos
e1614b5324 fix: revert back the bundle_draft_files cache key (#26897)
Changes the LMS/Studio bundle cache key,
thus invalidating all 47hr-TTL entries
in favor of new 50min-TTL entries.

TNL-7771
2021-03-08 12:34:51 -05:00
Zainab Amir
a39befb548 VAN-113: Add error code for registration workflow (#26821) 2021-03-08 18:09:26 +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
Matthew Piatetsky
013f7bfe34 Merge pull request #26744 from edx/AA-461
[AA-461] Export highlights to s3 for use by braze
2021-03-05 06:46:57 -05:00
Matt Tuchfarber
7f1c5023cd Merge pull request #26841 from edx/tuchfarber/fix_race_condition_cert_date
Move cert date signals to avoid race conditions
2021-03-04 17:40:50 -05:00
Matthew Piatetsky
8d1d7b2222 feat: Export highlights to s3 for use by braze
Things other than highlights may be exported in the future. The storage class is flexible so backends other than s3 may be used in the future.
AA-461
2021-03-04 15:57:30 -05:00
Matt Tuchfarber
6c97dfe1e5 Move cert date signals to avoid race conditions
COURSE_CERT_DATE_CHANGE was being called before saving the new data in
the course overview. The listeners were expecting to pull the data out
of the course overview, and thus were only right about half the time.
This moves the signal to trigger after the course publish signals are
handled.
2021-03-04 15:57:21 -05:00
adeel khan
18aa50ec0f Merge pull request #26853 from edx/adeel/van_178_change_shadow_box_background_color
Change email shadow box color
2021-03-04 18:55:53 +05:00
Adeel Khan
416546791d Change email shadow box color
VAN-178
2021-03-04 18:18:32 +05:00
Adeel Khan
883fffd2c6 Reduce top padding by half for emails
VAN-177
2021-03-04 17:28:41 +05:00
Adeel Khan
231dd68f90 Make button style primary
VAN-274
2021-03-04 07:50:09 +05:00
jawad khan
948d6351b6 LEARNER-8251 - Added BearerAuthenticationAllowInactiveUser in courseware view (#26829)
Added BearerAuthenticationAllowInactiveUser in courseware view
2021-03-03 18:39:42 +05:00
Azan Bin Zahid
936f19fa12 Merge pull request #26797 from edx/azan/PROD-2281
add user id (staff only) field in user_api
2021-03-03 15:22:27 +05:00
azanbinzahid
0ef2ba7e7c add lms user id in accounts endpoint 2021-03-03 14:27:44 +05:00
Michael Roytman
eb98d7fac5 MST-675: QuerySet Performance for StudentOnboardingStatusByCourse Endpoint (#26789)
* The original use of user.has_perm('can_take_proctored_exam') in the get_active_enrollments_for_course method had very poor performance when used for multiple learners. The permission is not designed for use in bulk operations. It was being called for each user in a loop by edx-proctoring, resulting in many queries to the database. This lead to timeouts on the client. This change exposes a new service endpoint that performs this permission checking in the database, resulting in one single query to the necessary LMS SQL tables and many fewer queries to the modulestore.

* bump version of edx-proctoring to 3.7.3
2021-03-02 19:46:58 -05:00
Michael Terry
9570c1c72b feat: add 'external course updates' experiment flag
When this flag is enabled, users will be 50/50 bucketed into an
experiment where users get course highlights and nudges from an
external service (like sailthru or braze) rather than from
edx-platform via ACE.

AA-661
2021-03-02 14:51:45 -05:00
Kyle McCormick
e792242b5f refactor!: remove redundant ENABLE_COURSEWARE_MICROFRONTEND toggle (#26792)
The Django setting
FEATURES['ENABLE_COURSEWARE_MICROFRONTEND']
has been an additional gate to activating
usage of the Learning MFE for an Open edX
instance.

The toggle is redundant with the
`courseware.courseware_mfe`
Waffle flag. By removing it, we simplify our config
and simplify our path towards making the Learning MFE
the default courseware experience.

TNL-7796
2021-03-02 11:36:43 -05:00
Usman Khalid
dd96a2aa72 Convert Course, Section and Sequence XModules to XBlocks. (#25965) 2021-03-02 10:29:33 -05:00
Feanil Patel
6e4e7648a5 Merge pull request #26790 from edx/feanil/fix-annotations
doc: Correctly annotate the setting name.
2021-03-02 10:19:01 -05:00
Zainab Amir
11791e25d4 VAN-367: Track optional and goals field usage (#26779) 2021-03-02 14:26:44 +05:00
Feanil Patel
d2343b1f07 doc: Correctly annotate the setting name.
The `setting_name` annotation needed a space before it so that it's
picked up properly by the toggle annotations tooling.
2021-03-01 16:35:41 -05:00
Dillon Dumesnil
7b1d4bcfc0 Merge pull request #26784 from edx/ddumesnil/update-entitlement-session-aa-682
AA-682: Update the pseudo session fallback session
2021-03-01 07:40:52 -08:00
Dillon Dumesnil
8bbea7f89a AA-682: Update the pseudo session fallback session
There was a bug where the earliest course returned for a pseudo session
(when there were no available sessions) might not exist in modulestore and
would cause a 500 error. The data problem is another issue that will need to
be fixed, but by switching to the most recent session in this scenario, we believe
we will reduce the likelihood of this error occurring. We also believe the most
recent session is a better return value than the first ever session.
2021-03-01 09:33:31 -05:00
Zainab Amir
773810e176 VAN-367: Capture optional fields usage (#26775) 2021-03-01 13:03:07 +05:00
stvn
b033b0d13d docs: Update references to Django MIDDLEWARE_CLASSES
As code was already updated (~1 year ago) in #23070.
A first attempt was made in #18342, which can now be closed.

References: https://github.com/edx/edx-platform/pull/23070
References: https://github.com/edx/edx-platform/pull/18342
2021-02-25 20:00:09 -08:00
stvn
8314971e0b refactor: Convert discussions to pluggable app
This minimizes our footprint outside of the djangoapp, now and moving
forward. Not only can we drop the `lms/envs/common.py` change, but we
can also avoid touching `lms/urls.py` when we add the API. Everything
can stay contained within `openedx/core/djangoapps/discussions`.
2021-02-25 18:51:25 -08:00
Justin Hynes
d6fa4de4b2 Merge pull request #26632 from edx/jhynes/log_exception_awarding_prog_certs
Log error when failing to award program certificate
2021-02-25 11:52:10 -05:00
Justin Hynes
03d788fc5b Log error when failing to award program certificate 2021-02-25 10:25:49 -05:00
Zachary Hancock
1af3b5a68c runtime service exposing learning_sequences api to proctoring (#26692) 2021-02-24 17:25:49 -05:00
Adeel Khan
d9ec42c425 Add throttling to validate token and reset password end points
VAN-312
2021-02-24 06:47:18 +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
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
Robert Raposa
40611bb915 ARCHBOM-1667: fix: remove authentication from auth exchange (#26618)
* Remove authentication, including SessionAuthentication, to fix CSRF
  exemption by dropping CSRF check of SessionAuthentication.
* Several changes to make it more clear that only POST is supported and
  clean up GET method testing.
* Removed the temporary 403 error logging that wasn't working.
* Removed test_single_access_token which was written for DOP, but
  doesn't work with DOT. See
  [MA-2122](https://openedx.atlassian.net/browse/MA-2122) for a ticket
  about implementing this for DOT, although it doesn't seem to be a
  priority. NOTE: A comment was added to the ticket explaining that this
  test was removed.
* GET now returns default error for methods not allowed.

ARCHBOM-1667
2021-02-23 10:57:11 -05:00
M. Zulqarnain
42fc6aef03 Upgrade django-ipware (#24827) 2021-02-23 18:14:17 +05:00