Commit Graph

22621 Commits

Author SHA1 Message Date
Nizar Mahmoud
5f7dbc2d45 docs: updates ticket annotations for block structure settings and toggles
Updates the annotations for the block structure settings and toggles based on a [discussion] that was held on the pull request that annotated those same settings and toggles.

It also adds the DEPR tickets that were promised earlier in the annotations.
For future reference, there's also a [forum thread] to discuss the DEPR tickets titled.

[discussion]: https://github.com/edx/edx-platform/pull/26175#issuecomment-800632485

[forum thread]: https://discuss.openedx.org/t/deprecation-removal-several-block-structure-caching-settings-depr-143-depr-144-depr-145-depr-146/4288?u=nizar
2021-03-18 13:05:32 +03:00
Dillon Dumesnil
7791f15509 refactor: AA-692: Update location of is-hidden class when fa icon is used
We ran into a bug where the is-hidden class was being overridden by the
font awesome styling due to a late load of font awesome (causing the
fa class to take precedence). This changes to instead wrap the icon in
the span so there is no competing between the two classes on the same
element
2021-03-17 10:57:56 -07:00
Bianca Severino
3af3f5bc11 Update edx-proctoring to 3.7.13 2021-03-17 13:18:16 -04:00
Robert Raposa
2c0a8242f7 ARCHBOM-1708: feat: monitor and log expected errors (#26980)
Adds logging and monitoring capabilities for expected
errors. See the ADR and how-to  documentation for
details of how to configure and use the EXPECTED_ERRORS
setting and new monitoring and logging.

ARCHBOM-1708

Co-authored-by: Tim McCormack <tmccormack@edx.org>
2021-03-17 07:27:13 -04:00
Jawayria
10d4c5259d Merge pull request #26581 from edx/jawayria/bom-2352-8
BOM-2352: Removed unused imports from lms/djangoapps/{lti_provider, m…
2021-03-17 12:56:53 +05:00
Christie Rice
6b7d63af09 MICROBA-1055 Listen for course enrollment mode change (#27029) 2021-03-16 14:06:46 -04:00
Christie Rice
90f5e42dbd MICROBA-1055 Require a valid enrollment mode, even on the allowlist (#27012) 2021-03-16 09:37:27 -04:00
Michael Terry
a7b75e5014 feat: mark forum response notifications transactional
The user opts into them when making a post / through the forums UI.
They are not truly a marketing email or similar.
2021-03-16 08:50:40 -04:00
Carla Duarte
a7b960bb54 Merge pull request #27016 from edx/ciduarte/AA-212
AA-212: add masquerade test for progress tab
2021-03-15 16:57:49 -04:00
Kyle McCormick
1f392bdc3e fix: render_xblock was denying access to staff masquerading as learners (#27017)
The render_xblock view, which powers the Learning
MFE (among other things) returned a 404 when un-
enrolled course staff users tried to load it while
masquerading as learners. This was because we
checked course access after enabling the
masquerading context, which triggered a redirect-
to-enrollment exception.

The fix is simply to enable the masquerading
context after checking course access.
Content-level behavior and access is still
calculated within the masquerading context,
as intended.

TNL-7989
2021-03-15 16:50:33 -04:00
Carla Duarte
dbe31e3c48 AA-212: add masquerade test for progress tab 2021-03-15 16:35:30 -04:00
Michael Terry
c79a640117 Merge pull request #27014 from edx/mikix/double-message
fix: don't duplicate text in forum notification email
2021-03-15 16:06:03 -04:00
Michael Terry
4aacedc604 fix: don't duplicate text in forum notification email 2021-03-15 15:29:01 -04: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
Justin Hynes
f00f562deb Merge pull request #26989 from edx/jhynes/microba-1011_allowlist-uniqueness
MICROBA-1011 | Remove duplicate allowlist entries and add constraint preventing future occurrences
2021-03-15 09:15:20 -04:00
Azan Bin Zahid
c20f938072 disable xsslint 2021-03-15 15:25:41 +05:00
Carla Duarte
f50b71b03c replace six with str 2021-03-12 15:32:05 -05:00
Justin Hynes
eed9202485 MICROBA-1011 | Remove duplicate allowlist entries and add constraint to model to prevent future occurrences
[MICROBA-1011]
- Add data migration to remove the duplicate certificate allowlist entries before adding the new constraint to the CertificateWhitelist model.
- Add `unique_together` constraint to the CertificateWhitelist model. A learner should only have a single allowlist entry per course-run.
2021-03-12 14:18:39 -05:00
Carla Duarte
c996f58e9d Merge pull request #26978 from edx/ciduarte/AA-213
AA-213: create progress tab mfe waffle flag
2021-03-12 13:27:06 -05: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
Carla Duarte
403358e09f AA-213: create progress tab mfe waffle flag 2021-03-12 10:08:34 -05:00
David Ormsbee
bebcbef3dd Merge pull request #26973 from open-craft/symbolist/convert-to-xblock
[BD-04] Create CustomTagTemplateBlock, convert TranslateCustomTagDescriptor to XBlock and remove RawDescriptor
2021-03-12 09:17:59 -05:00
Usama Sadiq
bd9bb424cd refactor: ran pyupgrade on lms/djangoapps/certificates (#26740) 2021-03-12 14:47:30 +05:00
Usama Sadiq
82406e970a reafctor: ran pyupgrade on lms/djangoapps/courseware (#26739) 2021-03-12 14:43:44 +05:00
Usama Sadiq
b1b3ba9c81 refactor: ran pyugprade on lms/djangoapps/courseware (#26738) 2021-03-12 12:16:46 +05:00
Usama Sadiq
859df03049 refactor: ran pyupgrade on lms/djangoapps/courseware (#26737) 2021-03-12 12:15:58 +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
Felipe Montoya
52f9c04a55 Merge pull request #26700 from jramnai/tst-automatic_auth_for_testing
[TSD] add annotations for AUTOMATIC_AUTH_FOR_TESTING feature flag
2021-03-11 15:10:21 -05:00
Usman Khalid
78cd8be24d XMLModuleStore should use HiddenDescriptor instead of RawDescriptor.
In https://github.com/edx/edx-platform/pull/25955 `HiddenDescriptor`
(which was a subclass of `RawDescriptor` with a custom `student_view()`)
was converted to an XBlock. It is used as the `default_class` by the
`CachingDescriptorSystem` classes. However `RawDescriptor` is still
being used by `XMLModuleStore`. This has been replaced by
`HiddenDescriptor` as well.
2021-03-11 22:20:33 +05:00
alangsto
027704adae Added optional param on submit post request to mark experiment name (#26925) 2021-03-11 10:31:47 -05:00
Felipe Montoya
3ed4c6548e Merge pull request #26942 from mitodl/arslan/243-allow-discussion-annotation
[TSD] Added annotation for ALLOW_HIDING_DISCUSSION_TAB feature flag
2021-03-11 10:29:20 -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
Peter Pinch
8f0530288c docs: add annotations for CUSTOM_COURSES_EDX (#25333)
* Add toggle and settings annotations for CCX

Co-authored-by: Robert Raposa <rraposa@edx.org>
2021-03-10 20:32:31 -05:00
Dillon Dumesnil
e641ba368c Merge pull request #26902 from edx/ddumesnil/segment-logout-aa-513
AA-513: Reset segment state if anon user and there is a segment user id
2021-03-10 11:08:16 -08:00
Felipe Montoya
dabfa5ff08 Merge pull request #26870 from jramnai/tsd-enable_discussion_home_panel
[TSD] add annotations for ENABLE_DISCUSSION_HOME_PANEL feature flag
2021-03-10 12:01:21 -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
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
Arslan Ashraf
c2ca03ba94 Add annotation for ALLOW_HIDING_DISCUSSION_TAB feature flag 2021-03-10 16:32:56 +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
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
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
Christie Rice
d14cc21395 MICROBA-923 Add ADR on course certificate allowlist (#26923) 2021-03-09 11:34:12 -05: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
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
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
Ali Akbar
6259a82059 Merge pull request #26866 from edx/aakbar/PROD-2293
fix override error message
2021-03-09 14:55:35 +05:00