Commit Graph

4565 Commits

Author SHA1 Message Date
Michael Terry
35f78a3241 feat!: remove all email_marketing djangoapp code
This djangoapp was designed for talking to sailthru, in a fairly
edx.org-specific way. Nowadays, edx.org doesn't need this code and
if other installations do, it's better off as a more distinct
plugin anyway, rather than direct support in the platform.

I've moved the one signal that was still useful (calling
segment.identify() whenever user fields change) into user_authn.

And I've left the EmailMarketingConfiguration model alone for now,
but will remove that shortly. Nothing uses it as of this commit.

AA-607
DEPR-139
2021-05-03 16:39:01 -04:00
Michael Terry
12e9763446 Merge pull request #27487 from edx/mikix/fix-gated-content-check
fix: properly set contains_gated_content field on xblocks again
2021-05-03 11:50:40 -04:00
Michael Terry
6e52aafc8c fix: properly set contains_gated_content field on xblocks again
This has been broken for a couple months, preventing proper display
of verified-only assignments on the dates tab and elsewhere.

AA-780
2021-05-03 10:17:17 -04:00
Shafqat Farhan
7c391f4c7e Merge pull request #27484 from edx/shafqat/VAN-437
[VAN-437] - Unlocking the learners upon successful password reset
2021-05-03 12:06:06 +05:00
stvn
718458115a docs: Remove completed TODO discussions item 2021-04-30 11:47:34 -07:00
stvn
e62705a365 feat: Add support to Discussions API for legacy cohort settings 2021-04-30 11:47:34 -07:00
stvn
1b76999c2f refactor: Remove get_course_discussion_settings helper 2021-04-30 11:47:34 -07:00
stvn
146887df1b refactor: Remove set_course_discussion_settings helper 2021-04-30 10:54:59 -07:00
DawoudSheraz
573d34c593 feat: add pacing info in course enrollment serializer 2021-04-30 19:45:47 +05:00
Shafqat Farhan
30bf95b053 VAN-437 - Unlocking the learners upon successful password reset 2021-04-30 18:36:21 +05:00
David Ormsbee
3e673f59b3 perf: Remove Modulestore call from Credit Service.
We can get the same information much more cheaply and predictably
by using CourseOverviews. This was contributing to slow traces for
the edx_proctoring.views:StudentOnboardingStatusView.get
transaction.
2021-04-29 10:43:47 -04:00
David Ormsbee
dfb80acc11 feat: Enrollment Tracks OutlineProcessor (MST-685)
NOTE: This will require a forced backfill of course outlines to update
the course content data in learning_sequences:

  python manage.py cms backfill_course_outlines --force

Without this backfill, the learning_sequences API will continue to serve
stale content data that has no user partition group data. It won't cause
errors, but it won't do the exclusions properly.

Commit summary:

* Created EnrollmentTrackPartitionGroupsOutlineProcessor to process the
  enrollment_track User Partition Group, allowing Sequences and Sections
  to be removed based on their group_access settings.
* Added user_partition_groups attribute to CourseLearningSequenceData
  and CourseSectionData in learning_sequences/data.py, along with
  backing model data.
* get_outline_from_modulestore now extracts group_access settings from
  Sections and Sequences. It also bubbles up group_access settings from
  Units, meaning that if a Sequence with no group_access setting has
  Units that are all set to show only to the Verified enrollment track,
  then the Sequence will only show to the Verified enrollment track.

This commit adds model-level support for all user partition groups by
capturing all the content group associations (group_access), but it only
implements the code checks for the enrollment track partition. It's not
clear that we want to generalize, since there's only one other partition
type (A/B testing) that is applicable at the outline level.

It's important to note that there is no way to set the group_access for
a Section or Sequence in Studio today. It's only possible by direct
editing of the OLX for import. That being said, the block structures
framework supports applying course groups at this level, and this commit
moves learning_sequences closer to feature parity.

The bubbling up from Units to the parent Sequence was done to mitigate
confusion when a Sequence is entirely composed of Units that are not
visible to the user because of content group restrictions. It's not
clear whether this is something we want to do in the long term, since it
would simplify the code to always specify group_access at the Sequence
level. This first pass is done partially to collect better data about
places in our courses where this kind of usage is already happening.

Most of the EnrollmentTrackPartitionGroupsOutlineProcessor code and its
tests were written by @schenedx.
2021-04-28 12:58:59 -04:00
stvn
eaeec735a9 feat: Add support for legacy discussions settings to API 2021-04-27 12:50:53 -07:00
stvn
4776ab1504 test: Add CourseFactory to discussions API tests 2021-04-27 12:37:29 -07:00
Olivia Ruiz-Knott
d7a4947ea9 Merge pull request #27322 from edx/ork/MICROBA-963_move-notify-credentials-to-celery-task
perf: move notify_credentials to a celery task
2021-04-27 09:47:03 -06:00
Binod Pant
735d01283e ENT-4383 fix the hinted login page experience when enterprise login enables hinted login (#27431)
* fix: 🐛 Correctly check that saml provider is available using tpa_hint in next param

This fixes the issue of 404 when an enterprise customer sends a tpa_hint in next, but that param is not correctly checked to disable auth MFE. The hinted login page now works with this change.

ENT-4383

* feat: comment update

comment update

ENT-4383
2021-04-27 11:33:00 -04:00
stvn
39ffd01c12 Merge PR #27371 bd03/api/change-provider/lti
* Commits:
  feat: Hide lti_configuration from non-LTI discussions providers
  fix: Update discussions lti_configuration during provider_type change
  feat: Add helper for discussions configuration to indicate feature support
  refactor: Remove superfluous dict comprehension
2021-04-27 08:21:57 -07:00
Hammad Ahmad Waqas
7a3b53afec Merge pull request #27430 from edx/hammad/ENT-4483
Updated account view to accept application/json for the post request.
2021-04-27 17:37:48 +05:00
HammadAhmadWaqas
149e448e5b Updated account view to accept application/json for the post request. 2021-04-27 16:47:57 +05:00
Usama Sadiq
588f11b100 refactor: apply lint-amnesty to pylint violations 2021-04-27 14:43:31 +05:00
oliviaruizknott
5fbb339c25 perf: move notify_credentials to a celery task
Before this change, the notify_credentials management command ran for
about 10-15 minutes and occasionally overlapped with an edxapp
deployment which would cause the machine the command was running
on to die. The command ran through a bunch of certs and grades, and then
spun off celery tasks to send the relevant data to credentials.

Now, most of the logic of the notify_credentials management command has
been moved into a new celery task, so that combing through longs lists
of certs and grades is done asynchronously. This task then spins off the
original data-sending tasks as before.

Note that this requires a change in alerting: where the jenkins job
would previously notify us about failures, we need to know when this
new celery task fails for any reason. We’ve made this a LoggedTask
so that failures will be logged to Splunk and alerting can be built off
of the error messages.

This commit also moves the relevant tests.

MICROBA-963
2021-04-26 12:11:25 -06:00
Dillon Dumesnil
82414f5b5e Merge pull request #27401 from edx/ddumesnil/enable-dates-tab-aa-741
feat: AA-741: Enables the dates tab for all enrolled learners
2021-04-26 10:56:08 -07:00
Julia Eskew
4462ed37b2 Revert "update login api" (#27416)
This PR might be causing e2e tests to fail. Reverting and merging without waiting on tests.
2021-04-26 10:07:36 -04:00
Mubbshar Anwar
2ab1f8f9c9 Merge pull request #27380 from edx/VAN-366
Add country code in MFEAppContextView
2021-04-23 20:05:59 +05:00
mubbsharanwar
709e31a2aa Add country code in MFEAppContextView
add new api MFEAppContextView to handle country code
add unit test MFEAppContextViewTest
this newly created api will be marged in TPAContextViewTest when margeing code in master branch

VAN-366
2021-04-23 19:12:35 +05:00
uzairr
5103f59df9 upgrade login api
Modify the existing login api in a way that
it will allow the user to login via username as well.
currently it is only allowing email to log the user in.

VAN-445
2021-04-23 17:21:18 +05:00
Dillon Dumesnil
0a08852600 feat: AA-741: Enables the dates tab for all enrolled learners
Removes the relative dates flag check as it is no longer
necessary to show the dates tab
2021-04-22 15:22:26 -04:00
Justin Hynes
35cfca0be1 Merge pull request #27357 from edx/jhynes/microba-1164_revoke-program-certs-bugfix
fix: fix bug with `revoke_program_certificates` task
2021-04-22 07:38:32 -04:00
Waheed Ahmed
5aa8245133 add username suggestions functionality (#27387)
Added username suggestions functionality upon username already exists
validation error for both registration and registration validation
endpoints.

VAN-52
2021-04-22 14:08:40 +05:00
Albert (AJ) St. Aubin
a1fe3d58dc [bug] Corrected issue where program dash showed incorrect completed
count

[MICROBA-1163]

This change will correct an issue in the Program Dashboard where a user
would see a course as completed, but not see their Certificate because
it was not available to them yet.
2021-04-21 16:03:33 -04:00
Justin Hynes
a7bc9d1cc1 fix: fix bug with revoke_program_certificates task
[MICROBA-1164]
* cast `course_key` as a string when scheduling the `revoke_program_certificates` task
* Update existing unit tests
* Move test utility method in test_tasks.py out from the middle of the test cases
* Fix spelling in test function name
2021-04-21 14:43:03 -04:00
Hammad Ahmad Waqas
c097cfc23e Merge pull request #27382 from edx/hammad/ENT-4483
ENT-4483 | added search_emails endpoint in accounts.
2021-04-21 20:16:57 +05:00
HammadAhmadWaqas
7489f14baf added search_emails endpoin in accounts. 2021-04-21 13:59:53 +05:00
Zaman Afzal
0d7245d346 Removed the waffle switch ENABLE_MULTIPLE_SSO_ACCOUNTS_ASSOCIATION_TO_SAML_USER (#27379) 2021-04-21 13:14:15 +05:00
Usama Sadiq
2b55959a8e refactor: apply lint-amnesty on existing violations 2021-04-20 23:51:31 +05:00
stvn
a99c95da64 feat: Hide lti_configuration from non-LTI discussions providers 2021-04-17 00:59:17 -07:00
stvn
33e499ea04 fix: Update discussions lti_configuration during provider_type change
Else, we risk updating it when we don't intend to, eg:
- changing from an LTI-backed provider (Piazza) to a non-LTI-backed
  provider (legacy)
  - the settings are no longer relevant
- changing from a non-LTI-backed provider (legacy) to an LTI-backed
  provider (Piazza)
  - the settings _are_ now relevant
2021-04-17 00:59:17 -07:00
stvn
c1742b7b66 feat: Add helper for discussions configuration to indicate feature support 2021-04-17 00:52:51 -07:00
stvn
fb2f8e6291 refactor: Remove superfluous dict comprehension 2021-04-17 00:48:01 -07:00
stvn
49594d92e6 fix: Grant course staff access to discussions API
to match expected behavior.
2021-04-16 11:23:44 -07:00
stvn
5284f397b4 refactor: Make discussions helper method more accessible
so we can use it elsewhere.
2021-04-16 11:23:44 -07:00
Kyle McCormick
b1fa2bdae6 refactor: make embargo app go through geoinfo API (#27350)
Consolidates all usage of geoip database within
geoinfo app.
2021-04-16 14:00:04 -04:00
Awais Qureshi
348f080bf9 Merge pull request #26466 from edx/BOM-2340
BOM-2340
2021-04-15 14:55:31 +05:00
Igor Degtiarov
70ab50181a fix: Hide enterprise/login button if enterprise integration disabled. (#27130)
* fix: Hide enterprise/login button if enterprise integration disabled.

[BTR-52](https://openedx.atlassian.net/browse/BTR-52)
Fix an issue with existing button for enterprise login on the login page
when enterprise integration is disabled.

* Address review comments
2021-04-15 11:54:56 +05:00
Ali Akbar
ece9f42177 Merge pull request #27335 from edx/aakbar/fix-pw-reset
fix: allow staff or superuser to reset password from support tools
2021-04-14 20:50:10 +05:00
Julia Eskew
7dbad0bd9a learning_sequence doc tweaks and new type annotation style (#27311)
* docs: Add a statement comment. Update learning sequences README.

* refactor: Add Python3.6+-style type annotations to attrs classes where possible.
2021-04-14 11:12:01 -04:00
stvn
ffcfc05a61 refactor: Move BetaTesterFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
22fb1ec124 refactor: Move InstructorFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
2fa36fb0cf refactor: Move StaffFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
5dd8302d8b refactor: Move GlobalStaffFactory helper to common/ 2021-04-14 07:26:39 -07:00