Commit Graph

18891 Commits

Author SHA1 Message Date
Michael Terry
033b9474ac Merge pull request #27502 from edx/mikix/drop-email-marketing
feat!: remove all email_marketing djangoapp code
2021-05-04 08:39:08 -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
Simon Chen
ebbb240027 MST-698 Remove escaping for Proctoring Requirements email on course_name and proctoring backend name (#27500)
The course name can contain apostrophes and other special characters. The email template right now escapes every words. This is not desired because it can render apostrophes like #39;. Update the email templates so only second half of the email template is escaped
2021-05-03 15:39:07 -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
Christie Rice
98636654dd feat!: Remove allow_certificate field from the user profile as the field is no longer used (#27424)
DEPR-140 MICROBA-985
2021-05-03 09:28:36 -04:00
Dillon Dumesnil
874242a1d4 Merge pull request #27456 from edx/ddumesnil/update-enrollment-activated-segment-aa-775
feat: AA-775: add course start and pacing to enrollment.activated segment event
2021-04-29 06:57:14 -07:00
edX cache uploader bot
94818924a5 Updating Bokchoy testing database cache 2021-04-29 12:08:51 +05:00
edX Transifex Bot
7d6edbe41d geoip2: update maxmind geolite country database 2021-04-29 02:11:21 +05: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
Dillon Dumesnil
1f58bbe522 feat: AA-775: add course start and pacing to enrollment.activated segment event 2021-04-28 11:29:22 -04:00
Christie Rice
44ed703d41 fix: Allow allow_certificate field to be null in preparation for removing it (#27432)
DEPR-140 MICROBA-985
2021-04-28 08:50:18 -04:00
edX cache uploader bot
af59696087 Updating Bokchoy testing database cache (#27445) 2021-04-28 17:36:15 +05:00
Usama Sadiq
588f11b100 refactor: apply lint-amnesty to pylint violations 2021-04-27 14:43:31 +05:00
Dillon Dumesnil
2330150193 Merge pull request #27406 from edx/ddumesnil/fix-staff-access-aa-646
fix: AA-646: Fix is_staff_user check to check for course staff
2021-04-26 10:56:25 -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
Dillon Dumesnil
8c18242ecb fix: AA-646: Fix is_staff_user check to check for course staff
It was checking for global staff, but really only needed to check
for course staff. This corrects the check.
2021-04-23 10:24:53 -04: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
Kyle McCormick
b0d41f6ebb refactor: simplify ProblemBlock inheritance hierarchy (#27363)
Previously, ProblemBlock's implementation was split between
CapaMixin/CapaFields (in capa_base.py) and ProblemBlock
(in capa_module.py), the former being the base classes of the
latter. The split existed for a historical reason:
as a former XModule, ProblemBlock was once split
between CapaDescriptor (author-facing) and CapaModule
(learner-facing). Since ProblemBlock has been converted
to being a pure XBlock, the division between the base
classes and the block class are no longer necessary
nor semantically helpful.

docs: Flesh out ProblemBlock's docstring a bit.
2021-04-22 12:44:15 -04:00
edX Transifex Bot
55b1375c7c geoip2: update maxmind geolite country database 2021-04-21 17:11:09 -04:00
Ali Akbar
025fb5ed66 Merge pull request #228 from edx/aakbar/xss-security-fixes
Fix XSS for numerous files
2021-04-22 01:16:47 +05:00
Julia Eskew
efa13ff1d2 fix: TNL-8233: Change exception raised at problem creation failure from generic exception to LoncapaProblemError. (#27361)
Raising this specific exception will cause the failure to be handled more gracefully by problem rescoring code.
2021-04-21 16:13:23 -04: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
Awais Jibran
62c8805e3e Refactor + Tests: Course Import Feature (#27369)
* Code Refactoring
This PR bumps code coverage by adding unit tests & clean up some code for improving code quality and maintainability.
2021-04-19 23:49:42 +05:00
Ali Akbar
9e8684cc72 Merge pull request #27367 from edx/aakbar/xss-disable-2
Refactor: disable xsslint for numerous files
2021-04-19 15:51:30 +05:00
Saad Yousaf
bb3be323f0 [TNL-8235] - Fix breaking code by updating the exception when load_file fails. (#27368)
Co-authored-by: SaadYousaf <saadyousaf@A006-00314.local>
2021-04-19 13:30:14 +05:00
Ali-D-Akbar
d84251de3b refactor: disable xsslint: PROD-2307 2021-04-19 12:21:43 +05:00
Ali-D-Akbar
e8f548fa9c refactor: disable xsslint: PROD-2309 2021-04-19 12:21:43 +05:00
Ahtisham Shahid
b73c0f0a90 Refactored InvalidProctoringProvider exception code (#27366) 2021-04-19 11:54:58 +05:00
Ali-D-Akbar
5631d695a4 refactor: disable xsslint: PROD-2308 2021-04-16 17:13:05 +05:00
Ali-D-Akbar
30b8edc0ac refactor: disable xsslint: PROD-2306 2021-04-16 17:13:05 +05:00
Ali-D-Akbar
643d5211ca refactor: fix xss PROD-2305 2021-04-16 14:09:16 +05:00
Ahtisham Shahid
58231c4262 Moved Import error messages to single place (#27331) 2021-04-15 12:25:04 +05:00
Diane Kaplan
3152c14192 fix: hide gated content message for library content questions (learning MFE only) (#27277) 2021-04-14 14:11:21 -04:00
stvn
970980f25a style: Alphabetize some imports 2021-04-14 07:38:55 -07:00
stvn
a3a58533a8 docs: Add and cleanup comments 2021-04-14 07:38:55 -07:00
stvn
1b3d915af7 refactor: Move RequestFactoryNoCsrf helper to common/ 2021-04-14 07:26:39 -07:00
stvn
f646971c74 refactor: Move OrgInstructorFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
31bc741410 refactor: Move OrgStaffFactory helper to common/ 2021-04-14 07:26:39 -07: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
8869a30bcd refactor: Move UserFactory 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
David Ormsbee
99c759f887 Revert "perf: avoid invoking codejail for problem response report" (#27310)
This reverts commit 35b2780658.
2021-04-12 17:17:31 -04:00
Sarina Canelake
2bdb05438d Merge pull request #26860 from open-craft/giantas/bb-3825-fix-new-post-indicator-in-discussion-xblock
[BB-3825] Fix:  Hide new post indicator on thread open
2021-04-12 14:47:10 -04:00
edX cache uploader bot
bb3bf5c15e Updating Bokchoy testing database cache (#27298) 2021-04-12 22:35:40 +05:00
Paul Aswa
b62478c365 fix: hide new post indicator on thread open
This fixes the removal of the new post indicator in the Discussion XBlock once a thread has been opened.
2021-04-12 19:29:44 +02:00
David Ormsbee
35b2780658 perf: avoid invoking codejail for problem response report
We don't need to execute instuctor code for the problem response
report because we're grabbing existing student state and scores.
Running codejail is expensive, slow, and risks report failures if
there is CPU intensive instructor code that is run at times when
the servers are already heavily loaded (and things start timing
out). This came up in TNL-8183 (and many others).
2021-04-07 11:11:07 -04:00