Commit Graph

58450 Commits

Author SHA1 Message Date
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
Awais Jibran
aad29c17f9 Updated drag and drop version (#26934) 2021-03-10 19:46:58 +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
Jeff Witt
ac4c1c37b7 feat: Allow HTML video player to use 2x playback speed
LEARNER-8247

Co-Authored-By: Sarina Canelake <sarina@edx.org>
2021-03-10 09:37:35 -05:00
AsadAzam
e797fec0df added iframe mfe overrides (#26824)
* added iframe mfe overrides

* Added import to rtl

* Refactored

* Added comment
2021-03-10 19:06:51 +05:00
Zachary Hancock
88f0aa5e0c update edx-proctoring to 3.7.9 (#26926) 2021-03-10 08:54:02 -05:00
Awais Qureshi
805e10a5ac BOM-2442
pyupgrade in course-bookmarks, course-duration
2021-03-10 18:35:45 +05:00
Awais Qureshi
66bd34743c BOM-2442
pyupgrade in content-type-gating
2021-03-10 18:31:46 +05:00
Justin Hynes
1afdd71c53 Merge pull request #26921 from edx/jhynes/microba-1025_update_mngmt_cmd
MICROBA-1025 | Update cert_whitelist management command
2021-03-10 08:03:19 -05:00
M. Zulqarnain
b4614d75f0 BOM-2378 (C) : pyupgrade in common/lib/xmodule (#26736)
* refactor: pyupgrade in common/lib/xmodule

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
2021-03-10 17:56:39 +05:00
M. Zulqarnain
8e8420dd46 BOM-2378 (B) : pyupgrade in common/lib (#26731)
* refactor: pyupgrade on common/lib

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
2021-03-10 17:56:24 +05:00
M. Zulqarnain
deb7f5b026 refactor: pyupgrade in common/lib/xmodule (#26780) 2021-03-10 17:56:07 +05:00
M. Zulqarnain
8aec103447 refactor: pyupgrade in common/lib/xmodule (#26781) 2021-03-10 17:55:49 +05:00
Awais Qureshi
51d0d68a1e BOM-2375-student-part2
pyupgrade in student app.
2021-03-10 16:50:00 +05:00
Arslan Ashraf
c2ca03ba94 Add annotation for ALLOW_HIDING_DISCUSSION_TAB feature flag 2021-03-10 16:32:56 +05:00
Awais Qureshi
094573e901 BOM-2375-student-part2
pyupgrade in student app.
2021-03-10 16:17:22 +05:00
Awais Qureshi
ba4708edd0 Merge pull request #26888 from edx/BOM-2442-calendar-sync
pyupgrade in calendar-sync.
2021-03-10 15:58:31 +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
edX cache uploader bot
9bfa56e27b Updating Bokchoy testing database cache (#26929) 2021-03-10 13:13:37 +05:00
David Ormsbee
4c3fd76904 fix: add index to courseware_studentmodule for report performance.
= IMPORTANT WARNING =

This can be a VERY EXPENSIVE MIGRATION which may take hours or
days to run depending on the size of the courseware_studentmodule
table on your site. Depending on your database, it may also lock
this table, causing courseware to be non-functional during that
time.

If you want to run this migration manually in a more controlled
way (separate from your release pipeline), the SQL needed is:

  CREATE INDEX `courseware_stats` ON `courseware_studentmodule`
     (`module_id`, `grade`, `student_id`);

You can then fake the migration:
  https://docs.djangoproject.com/en/2.2/ref/django-admin/#cmdoption-migrate-fake

= Motivation and Background =

TLDR: This adds an index that will speed up reports like the
Problem Grade Report. This fixes a performance regression that
was unintentionally introduced in 25da206c.

I'm capturing the entire saga below, in case Open edX operators
need to dig into it.

The tale begins in November of 2012 (yes, seriously). We had an
inline analytics feature that would display a histogram to course
staff by each problem in the LMS, detailing how students did on
that problem (e.g. 80% got 2 points, 10% got 1 point, 10% got 0
points). The courseware_studentmodule table already had an index
on the module_id (a.k.a. module_state_key), but because there
were 100K+ students that had student state for some problems,
the generation of those histograms was still extremely expensive.
During U.S. Thanksgiving weekend in late November of 2012, that
load started causing operational failures on edx.org.

As an emergency measure, I manually added a composite index for
(module_id, grade, student_id) on courseware_studentmodule in
order to stabilize the courseware on edx.org. I did _not_ follow
up properly and add it in a migration file. Later on, the inline
analytics feature was removed entirely, so the index was considered
redundant (but again, it was not properly cleaned up).

Various reports were created over the years, some of which
relied on having an index for module_id. These ran fine because
there had long been an index for that field specifically.

In 2018, the courseware_studentmodule table for edx.org ran into
the 2 TB size limit that our old RDS instance had. We had a fair
amount of monitoring for various limits that we thought we might
run into, but the per-table limit took us by surprise. The Devops/
SRE person fielding that issue needed to free up space in a hurry
in order to make the courseware functional again. Examining the
database itself, he noticed that we had a module_id index that was
technically redundant because the composite index of (module_id,
grade, student_id) would cover queries that would otherwise use it.
Again, as an emergency measure, he dropped the index on module_id
in order to free up a little space and buy enough time to do a
proper move of the database to Aurora.

Devops-of-2018 being more disciplined than me-of-2012, the index
on module_id was removed in 25da206c. The intention was to make it
so that the state of the code would match what was live on edx.org.
But because the composite index was added in an ad hoc way, what
that really meant was that now queries involving module_id were
_only_ indexed by the (module_id, grade, student_id) composite
index that existed only on edx.org and no other Open edX instances.

We didn't realize this issue until months later. @blarghmatey
created an index to re-add the index for module_id:

  https://github.com/edx/edx-platform/pull/20885

The reason why we didn't accept this immediately is because
migrations for this table are very operationally risky and take
days to run. Faking this migration would have put edx.org even
more out of sync with the Open edX repo. Complicating this
somewhat was the fact that some folks still seem to be running a
variant of the inline analytics on their fork.

So in the end, we're going forward with this migration that brings
the code fully into sync with indexes on edx.org and covers the
obscure inline analytics histogram use case, while still covering
the module_id index needed for the fast generation of certain
reports that focus on a single problem.

Sorry folks.
2021-03-09 17:28:12 -05:00
adeel khan
a3d5d7415b Merge pull request #26924 from edx/adeel/van_272_forward_fix
Fix button/title text
2021-03-10 01:25:35 +05:00
Dillon Dumesnil
16d81f6e6d AA-513: Reset segment state if anon user and there is a segment user id
If we are seeing an anonymous user, but the segment user id is still
set, we believe the segment user id is coming from a different user on
the same machine. This will make sure we clear out that storage and
then the indentify call will make a new anonymous id
2021-03-09 13:17:40 -07: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
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
Nadeem Shahzad
afd3c60d9a Merge pull request #26914 from edx/nadeem/packer_ami_ubuntu_20.04
Pin diff-cover to fix tests on Ubuntu 20.04
2021-03-09 21:51:29 +05:00
Christie Rice
d14cc21395 MICROBA-923 Add ADR on course certificate allowlist (#26923) 2021-03-09 11:34:12 -05:00
nadeemshahzad
15d32811e5 pin diff-cover to fix tests on ubuntu 20.04 2021-03-09 16:22:28 +00:00
Christie Rice
4aff07ad82 MICROBA-923 Add method to generate V2 course certificates (#26898) 2021-03-09 11:02:19 -05:00
Kyle McCormick
05dbd83290 fix: streak celebration feature should require progress milestones (#26922)
In commit 9b37e7d0, the logic of
`streak_celebration_is_active` was accidentally
changed such that it no longer checks the
Progress Milestones waffle flag.
This commit fixes that.

Note: This also adds in a transitive check to
`courseware_mfe_is_active`,
which makes sense for Streak Celebration
and should not have any functional impact.
2021-03-09 10:23:13 -05:00
Usman Khalid
e624a8f4ac Convert CustomTagModule to CustomTagBlock. 2021-03-09 09:27:43 -05:00
Usman Khalid
48290cf837 Convert PollModule to PollBlock. 2021-03-09 09:27:43 -05:00
Ahtisham Shahid
60ef705944 Updated drag and drop version (#26919)
Updated drag and drop version
2021-03-09 19:23:00 +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
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
Awais Qureshi
1ab5d4dfed Merge pull request #26671 from edx/BOM-2374-edxmako
Run Pyupgrade on edxmako.
2021-03-09 18:35:14 +05:00
M. Zulqarnain
a664067323 refactor: pyupgrade in common/tests (#26725) 2021-03-09 18:03:34 +05:00
Awais Qureshi
f0cac0c09d Merge pull request #26893 from edx/BOM-2375-student-1
BOM-2375-student-part1
2021-03-09 17:52:30 +05:00
Jawayria
b31c18d6db BOM-2352: Removed unused imports from lms/djangoapps/{grades, instructor} 2021-03-09 17:25:54 +05:00
Jawayria
0c33d80ac0 Merge pull request #26580 from edx/jawayria/bom-2352-7
BOM-2352: Removed unused imports from lms/djangoapps/{instructor_anal…
2021-03-09 17:04:06 +05:00
M. Zulqarnain
42eacaf8de refactor: pyupgrade in common/util + xblock_django (#26724) 2021-03-09 16:49:51 +05:00
Ali Akbar
6259a82059 Merge pull request #26866 from edx/aakbar/PROD-2293
fix override error message
2021-03-09 14:55:35 +05:00
Usama Sadiq
2adf8b759e refactor: ran pyupgrade on lms/djangoapps/commerce (#26734) 2021-03-09 14:21:08 +05:00
edX cache uploader bot
1310f9ed70 Updating Bokchoy testing database cache (#26906) 2021-03-09 14:19:10 +05:00
Usama Sadiq
afa102e125 refactor: ran pyupgrade on lms/djangoapps/course_api (#26735) 2021-03-09 12:54:42 +05:00
Usama Sadiq
7e275ec3ca refactor: ran pyupgrade on lms/djangoapps (#26523)
ran pyupgrade on course_Wiki, coursewarehistoryextended
2021-03-09 12:49:44 +05:00
edX requirements bot
b648b0ad43 Updating Python Requirements (#26907) 2021-03-09 12:14:50 +05:00
Matthew Piatetsky
38ee797cfe Merge pull request #26899 from edx/AA-461
[AA-461] Change course metadata export to be a celery task
2021-03-08 16:54:19 -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