Commit Graph

5629 Commits

Author SHA1 Message Date
Mike OConnell
2271f3112e Merge pull request #24347 from edx/moco/ENT-3049-2
Check current enterprise for consent
2020-06-29 14:14:19 -04:00
Mike O'Connell
d191b52ee9 Check current enterprise for consent
When checking if consent is needed, ignore any enterprise
learner details that are not for the learner's currently
active enterprise.

ENT-3049
2020-06-29 12:57:03 -04:00
Michael Terry
3030efec78 AA-177: Add masquerading for course home MFE
- Looks at masquerading config for dates, outline, metadata, and
  celebration APIs in course_home_api / courseware_api.
- Consolidates and cleans up places we check whether masquerading
  gives us full access to a course.
2020-06-29 12:37:47 -04:00
Aarif
9e34cb3df9 Removed deprecated future imports (#24295) 2020-06-28 23:40:03 +05:00
Luis Moreno
600b8bcdd5 Fix invalid escape sequence deprecation warning. 2020-06-26 13:49:41 -04:00
Danial Malik
c962423bbc Replace track calls with eventtracking in task_track and server_track (#24282)
* Replace track calls with eventtracking in task_track and server_track

* Making  events compatible with events emitted via track app

* Fixed broken tests and quality violation

* Removed useless changes in shim. using  in  to have  and  keys in event context

Co-authored-by: zia.fazal@arbisoft.com <zia.fazal@arbisoft.com>
2020-06-26 13:49:16 -04:00
Zainab Amir
0b80987ba0 Add vem_enabled_courses_percentage (#24294)
Add a field to VEM config model that will decide the percentage of
courses allowed to go to VEM pipeline. The courses that don't meet the
criteria will go to VEDA.

PROD-1722
2020-06-26 14:30:42 +05:00
Calen Pennington
d933541dad Merge pull request #24302 from cpennington/prioritize-access-denied-messages
Prioritize access denied messages
2020-06-25 10:15:57 -04:00
Calen Pennington
aef3a20e5d Prioritize access denials in block transformers from groups that have messages associated with them 2020-06-25 09:51:50 -04:00
Muhammad Ammar
6e4d8e9b08 Merge pull request #24283 from edx/ammar/ENT-2998-override-enrollment-attributes
override enrollment attributes for learners
2020-06-24 22:05:57 +05:00
muhammad-ammar
4a3eb16296 override enrollment attributes for learners
ENT-2998
2020-06-24 21:37:24 +05:00
Kyle McCormick
c3d7ab9943 Fix programs cache ADR formatting (#24320) 2020-06-24 11:55:43 -04:00
Nimisha Asthagiri
a219381361 Update 0001-refactor-waffle-flag-default.rst (#24308) 2020-06-23 21:03:06 -04:00
Robert Raposa
f060872878 update waffle flag and docs (#24299)
- update ADR to provide more alternatives for updating
the default value of a flag.
- add a `flag_` prefix to the flag metrics
- add module-level note about flag metrics
- add NewRelic query example and warning
- fix typo in toggle annotation

ARCHBOM-1302
2020-06-23 13:55:06 -04:00
Nick
e8fc653c86 Merge pull request #24285 from edx/ndalfonso/AA-142-calendar-sync-ses
AA-142 calendar sync ses
2020-06-23 13:52:42 -04:00
Nicholas D'Alfonso
5b1d181491 AA-142 calendar sync ses
- set up util function to use Amazon SES for sending calendar
  sync emails.
- remove old sailthru code which we originally implemented for
  this functionality
- include ADR on our decision to use SES instead of Sailthru.
2020-06-23 12:14:03 -04:00
Aarif
27480cdd2f Removed deprecated future imports 2020-06-23 18:51:43 +05:00
Robert Raposa
a1ed944c72 add temp waffle flag default metric (#24284)
The argument flag_undefined_default is soon to be retired
once ARCHBOM-132 is closed. The following will be used to
help ensure the rollout is complete.

- Add a temporary metric if flag_undefined_default is used.
- Add deprecation warning for flag_undefined_default.
- Add minor fix for waffle flag metric when no request found.

ARCHBOM-132
2020-06-22 13:53:17 -04:00
Robert Raposa
5ea9d313ad add ADR for waffle flag default (#24272)
We are changing how we handle updates to a waffle flag
default, and the ADR explains why and how.

ARCHBOM-1303
2020-06-22 10:12:10 -04:00
Robert Raposa
343a5a8a74 update waffle flag custom metrics (#24270)
The previous version of this code used the Django Setting
ENABLE_WAFFLE_FLAG_METRIC to determine whether to add a single
metric with a dict of details about all flags. Due to
NewRelic's 256 character limit on the metric value, this was
getting truncated.

This new version instead uses the Django Setting
WAFFLE_FLAG_CUSTOM_METRICS, a list of waffle flag names to
instrument.

The name of each custom metric will match the name of the flag.
The value of the custom metric could be False, True, or Both.

The value Both would mean that the flag had both a True and False
value at different times during the transaction. This is most
likely due to having a check_before_waffle_callback, as is the
case with CourseWaffleFlag.

ARCHBOM-132
2020-06-22 10:11:40 -04:00
Ahtisham Shahid
5707bbdc90 updated confirm_email field type (#24205)
* updated confirm_email field type and removed confirm email form v1
2020-06-22 17:10:41 +05:00
Manjinder Singh
566765f919 Removing flaky test (#24262) 2020-06-19 12:13:52 -04:00
David Ormsbee
0b4cf7e06c Merge pull request #23039 from open-craft/samuel/fix-unescaped-selector
SE-2176 Fix elem not selected if id contains special chars
2020-06-19 12:13:20 -04:00
David Ormsbee
bfce2af065 Merge pull request #24058 from open-craft/arbrandes/optimize-blockstore-cache-v2
Optimize blockstore cache
2020-06-19 12:11:59 -04:00
Leonardo Martinez
b4fee68283 Fix the DeprecationWarning for unescape (#23936)
This PR solves the DeprecationWarning mentioned in:
https://build.testeng.edx.org/job/edx-platform-python-pipeline-master/warning_5freport_5fall_2ehtml/

HTMLParser was renamed in html.parser in Python3:
https://docs.python.org/2/library/htmlparser.html#module-HTMLParser

* html_parser.HTMLParser().unescape from six.moves has been deprecated

* instead use html.unescape from Python3

Documentation for unescape in Python3:
https://docs.python.org/3/library/html.html#html.unescape

- html_parser from six.moves has been deprecated

- instead use html.parser from Python3

- Order imports using isort

- Delete unused import crum
2020-06-19 09:27:45 -04:00
stvn
994b2b002f Add explicit masquerade support to courseware API 2020-06-18 14:54:49 -07:00
stvn
a69855e9ad Merge PR #24245 cleanup/log.warn
* Commits:
  Replace references to 'log.warn' with 'log.warning'
2020-06-18 14:50:37 -07:00
Daniel Francis
82c0ca0da8 Fixing implicit parser name for Beautiful Soup (lms, openedx) (#24100)
Fixing 56 GuessedAtParserWarnings, in commit edx#24098

Background: BeautifulSoup automatically picks the fastest parser available. By default, it picks the "lxml" parser.

Per the [BeautifulSoup](https://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser) documentation:

> Beautiful Soup supports the HTML parser included in Python’s standard library, but it also supports a number of third-party Python parsers. One is the lxml parser. Depending on your setup, you might install lxml with one of these commands.
> Another alternative is the pure-Python html5lib parser, which parses HTML the way a web browser does. 

Context: We changed two statements, one in lms and another in openedx. Both statements fire up BeautifulSoup. Now we explicitly ask for "lxml," following the recommendation on BeautifulSoup's documentation:

> If you can, I recommend you install and use lxml for speed. If you’re using a very old version of Python – earlier than 2.7.3 or 3.2.2 – it’s essential that you install lxml or html5lib. Python’s built-in HTML parser is just not very good in those old versions.

Before:
`soup = BeautifulSoup(content)`

After:
`soup = BeautifulSoup(markup=content, features="lxml")`

The warnings are gone, tests are passing in local.
2020-06-18 15:41:07 -04:00
stvn
0ae91c0921 Replace references to 'log.warn' with 'log.warning'
to remove some `DeprecationWarning`s from the logs
as the former method as been deprecated since Python 3.3 [1][2].

- [1] https://github.com/python/cpython/blob/3.3/Lib/logging/__init__.py#L1252-L1253
- [2] https://stackoverflow.com/a/15655674
2020-06-18 12:08:15 -07:00
Robert Raposa
a1572dafce add waffle_flag custom metric (#24244)
If setting ENABLE_WAFFLE_FLAG_METRIC is True, a custom
metric will be added with the values of all WaffleFlag
and CourseWaffleFlags seen during the transaction.

Metric flag values could be False, True, or Both.
The value Both would mean that the flag had both
a True and False value at different times through
the transaction. This is most likely due to having a
check_before_waffle_callback, as is the case with
CourseWaffleFlag.

Example metric value:

    "{'another.course.flag': 'False', 'some.flag': 'False', 'some.course.flag': 'Both'}"

Warning: NewRelic does not recommend large custom
metric values due to the potential performance
impact on the agent, so you may just want to
enable when researching usage of a particular flag.
Metric values longer than 255 are truncated.

TODO: A how_to can be added later if we find this
useful, including helpful querying tips.

ARCHBOM-132
2020-06-18 12:21:57 -04:00
Michael Terry
d325943fe5 Merge pull request #24169 from edx/mikix/celebration
AA-137: Support courseware celebrations
2020-06-18 10:49:36 -04:00
atesker
12aba3bd94 PR comments 2020-06-18 10:31:24 -04:00
atesker
8bf47afdae Initial ADR draft - comments and move 2020-06-18 10:31:24 -04:00
atesker
992ca3174e Initial ADR draft 2020-06-18 10:31:24 -04:00
Adam Butterworth
c37f73c40e Merge pull request #24158 from eduNEXT/lmm/course_sock_standalone
[BD-10] Remove unused course sock URL.
2020-06-18 09:16:26 -04:00
Adam Butterworth
4ebe6a8458 Merge pull request #24111 from eduNEXT/ama/DEPR-79
[BD-10] [DEPR-79] Remove pattern library of mobile/course-dates-fragment.html
2020-06-18 09:15:43 -04:00
Adam Butterworth
98dd03a638 Merge pull request #24077 from eduNEXT/ama/DEPR-78/DEPR-82
[BD-10] [DEPR-78][DEPR-82] Remove pattern library of latest-update-fragment.html and welcome-message-fragment.html
2020-06-18 09:15:20 -04:00
Adam Butterworth
0768acbf40 Remove pattern library of course_experience/course-outline-fragment.html (#24044) 2020-06-18 09:14:38 -04:00
Adeel Khan
f565c75d94 Fixes xss issues.
PROD-1532
PROD-1533
PROD-1577
PROD-1578
2020-06-18 15:09:55 +05:00
Ali Akbar
edd9b02d52 Merge pull request #180 from edx/sustaining-xsslint-security-fixes
Sustaining xsslint security fixes
2020-06-18 11:32:39 +05:00
morenol
41543edd93 Remove course_experience.use_bootstrap waffle flag (#24028)
[BD-10] [DEPR-83]
2020-06-17 13:26:51 -04:00
Ahtisham Shahid
1743e0e590 Merge pull request #24228 from edx/ahtisham/PROD-1679
Removed confirm email after SSO
2020-06-17 12:25:26 +05:00
Michael Terry
450072582e AA-137: Support courseware celebrations
- Add a new CourseEnrollmentCelebration model, which ties a
  course enrollment to some booleans about progress celebrations
- Add serialization of the new model to the existing courseware_api
  app's existing course info view
- Add new API in courseware_api to update a celebration model
2020-06-16 15:19:21 -04:00
Ahtisham Shahid
340e00988f Removed confirm email after SSO 2020-06-16 14:06:52 +05:00
SaadYousaf
52cfe647b3 syncing certificates on course update on credential side. 2020-06-16 11:58:49 +05:00
Samuel Walladge
43f0cd72af Merge remote-tracking branch 'origin/master' into samuel/fix-unescaped-selector 2020-06-16 09:52:38 +09:30
Nick
badf3281b3 Merge pull request #24122 from edx/ndalfonso/AA-133-mfe-dates-banner
AA-133 mfe dates banner
2020-06-15 15:08:02 -04:00
Nicholas D'Alfonso
9a83d0781b AA-133 mfe dates banner
- add serializer mixin to expose date banner info
- add endpoint to reset deadlines for a sepcific course
2020-06-15 14:22:23 -04:00
Michael Terry
557079042f Guard highlights against null module
Sometimes a course module will not exist and was causing exceptions
in our weekly highlights mail code. This will hopefully guard against
that a bit better.
2020-06-12 14:57:09 -04:00
Calen Pennington
06e5e2db51 Merge pull request #24144 from cpennington/hide-dates-banner-archived
Hide dates banner archived
2020-06-11 14:03:09 -04:00