Commit Graph

6089 Commits

Author SHA1 Message Date
Alex Dusenbery
4b247013ff feat: account activation now supports a next query param. ENT-4433
This change causes the activation link that’s emailed to a newly-registered user
to utilize a next query parameter. The impetus for this change is an edX Enterprise use-case:
we'd like newly registered Enterprise Customer admins and learners
to be directed to the Enterprise Learner Portal (or Admin Portal) upon account activation.
This is likely a broad enough use case to be valuable in other endeavors.
2021-05-10 12:58:26 -04:00
Usama Sadiq
63a9327a9d refactor: pyupgrade second iteration (#27460) 2021-05-10 13:57:24 +05:00
Usama Sadiq
64752ed66c refactor: pyupgrade second iteration (#27459) 2021-05-10 13:56:40 +05:00
Dillon Dumesnil
5085580697 Merge pull request #27554 from edx/ddumesnil/start-end-date-comments
refactor: Switch to using course_overview start and end everywhere
2021-05-07 10:46:25 -07:00
stvn
8ed13dfbc3 tests: Add data tests for Discussions API
Closes stvstnfrd/openedx-meta#3
Closes CENG-58
Closes TNL-8230
2021-05-07 09:23:40 -07:00
stvn
165944c091 fix: Improve validation in Discussions API 2021-05-07 09:23:40 -07:00
Vladas Tamoshaitis
ec98847c74 feat: Add Waffle flag to enable/disable special exams on MFE learning (#27545)
* feat: Use forked RG version of edx_proctoring in devstack

* Add waffle flag for special exams for mfe (#2371)

* feat: add waffle flag for special exams for mfe

* fix: waffle flag name, add coma to imports

Co-authored-by: Vladas Tamoshaitis <vladas.tamoshaitis@raccoongang.com>

* fix: revert requirements for master branch

* fix: revert dev requirements

* fix: trailing comma after imported item

* feat: add special exams waffle flag test

* fix: use ENABLE_SPECIAL_EXAMS global settings flag

* fix: toggle description

* fix: naming of waffle flag helpers to reflect relation with mfe

* fix(tests): assertion operators order

Co-authored-by: Sagirov Eugeniy <sagirov19@gmail.com>
Co-authored-by: Sagirov Evgeniy <34642612+UvgenGen@users.noreply.github.com>
Co-authored-by: Vladas Tamoshaitis <vladas.tamoshaitis@raccoongang.com>
2021-05-07 08:52:53 -04:00
Adeel Ehsan
798b523712 Revert "CTA dialogue added" (#27560) 2021-05-07 16:17:18 +05:00
Adeel Ehsan
03a8dbffb7 Merge pull request #27334 from edx/aehsan/Van-434/cta_dialogue_box_added
CTA dialogue added
2021-05-07 05:42:56 +05:00
Dillon Dumesnil
89c463ff29 refactor: Switch to using course_overview start and end everywhere
In DE-1822, we believed we needed to switch to start_date and end_date.
It was determined this was not the case, so this updates the comment
to ensure future users use the correct fields (start and end) and
updates any pieces of code that may have used start_date or end_date.
2021-05-06 16:42:10 -04:00
David Ormsbee
b77031564d perf: Instrument learning_seuqences outline processor details.
We already had function traces to see how long each processor took when
generating a UserCourseOutlineData. This adds a similar tracking around
making a UserCourseOutlineDetailsData, to help track down performance
issues observed in what I think is the special exams processor.
2021-05-06 14:26:00 -04:00
Kshitij Sobti
161e3560dd feat: Add REST endpoints for problem response report generation that can be driven by MFEs. (#27313) 2021-05-06 14:05:14 -04:00
adeelehsan
dc306f8f6d CTA dialogue added
VAN-434
2021-05-05 23:29:47 +05:00
Waheed Ahmed
3e87c1f277 refactor: update username suggestions logic (#27525)
Used integers instead of alphanumerics to generate username suggestions.

VAN-52
2021-05-05 23:28:55 +05:00
Albert (AJ) St. Aubin
ee71594714 refactor!: Remove backpopulate_program_credentials in favor of using
notify_credentials command

In this PR we are removing a management command that has performance issues and duplicates logic not available in the notify_credentials management command.
2021-05-05 12:22:38 -04:00
Albert (AJ) St. Aubin
65977a9e02 [feat] Added program_uuids to notify_credentials mgmt cmd (#27503)
* [feat] Added program_uuids to notify_credentials mgmt cmd

[MICROBA-951]

To support updating a users credentials in the Credentials services for
all users enrolled in a program we have added a command line argument to
the notify_credentials command called program_uuids. This supports a
list of program uuids. It will retrieve all course runs in the listed
programs and update the related credentials data.

* updated comments
2021-05-05 11:48:11 -04:00
Uzair Rasheed
c450de4062 Merge pull request #27496 from edx/update-login-api
upgrade login api
2021-05-05 13:15:22 +05:00
Zainab Amir
8d4ccf950a Update validation messages for register endpoint (#27476)
As part of authn redesign, validation messages have been updated.
- created a new endpoint for validations
- updated username/email conflict message in registration api based on
authn check

VAN-288
2021-05-05 12:33:59 +05:00
Michael Terry
78c6be8bee Merge pull request #27422 from edx/mikix/handler-will-recheck-access
fix: the get_completion JS handler should not ignore FBE blocks
2021-05-04 15:54:36 -04:00
Julia Eskew
599d21b7bb feat: Deny course staff visibility of legacy courseware. (#27469)
Currently, course staff can always view their courses
in the Legacy courseware experience.

With this change, course staff will *not* be able
to view their courses if the New (MFE) courseware
experience has been enabled for them.

This does not affect global staff, and it does not
affect courses that are still running in the Legacy
experience.

Adds a new parameter returned by the course metadata API
used by the courseware MFE to determine if the button to
show legacy experience should be displayed or not.

TNL-8203
2021-05-04 13:55:34 -04:00
Justin Hynes
6313c1ba67 Merge pull request #27501 from edx/jhynes/microba-1178_modulestore
refactor: reduce certificate django apps dependence on the modulestore (generation_handler)
2021-05-04 13:03:15 -04:00
Justin Hynes
5db4fd5bb2 refactor: reduce certificate django apps dependence on the modulestore (generation_handler)
[MICROBA-1178]
- remove modulestore usage in `generation_handler.py`
- add duplicate functions that utilize a CourseKey or CourseOverview to remove dependence on modulestore (this will be cleaned up (if possible) at a later part of this refactor)
- add python API function to `content`/`course_overview` app that will retrieve a single CourseOverview (rather than a serialized list of dicts of CourseOverview data)
2021-05-04 07:47:58 -04:00
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
uzairr
ac054f92b1 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-05-03 11:38:07 +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
Michael Terry
b90039b23d fix: the get_completion JS handler should not ignore FBE blocks
Because xblock handlers normally get a block tree that already has
inaccessible blocks stripped, they don't see FBE gated blocks at
all. So the get_completion handler would return True for FBE units
incorrectly. Leading to a visual bug as an audit user went through
their units in the courseware.

In order to let the handler know about the full tree, I've added a
new attribute you can set on your xblock handlers:
my_handler.will_recheck_access = True

This will tell the top-level handler code get the full tree for you.

As part of this, I've also changed the sequence xblock handler's
into proper xblock handlers (not old-style xmodule handlers).
This changes their URLs slightly. I've kept the old URLs for now
as well, but they'll be removed after Maple.

AA-409
2021-04-27 15:17:53 -04: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