Commit Graph

4470 Commits

Author SHA1 Message Date
Jeff LaJoie
972c7f3bc1 Merge pull request #23954 from edx/jlajoie/AA-163
AA-163: Fixes duplicate dates tab issue
2020-05-12 09:08:54 -04:00
Jeff LaJoie
c180070a9a Fixes serialization of course key for celery in course updates command 2020-05-12 09:02:49 -04:00
Jeff LaJoie
ee0f4567a8 AA-163: Fixes duplicate dates tab issue 2020-05-12 08:38:14 -04:00
Calen Pennington
ce6c9383d9 Merge pull request #23958 from cpennington/fix-case-collision-course-keys
Fix case collision course keys
2020-05-11 14:29:40 -04:00
Calen Pennington
bf16155c0f Make sure that case collisions don't propagate into the CourseOverview data 2020-05-11 13:55:27 -04:00
mariajgrimaldi
8063adf5eb changed cookie_date for http_date (#23929)
I wanted to make a byte-sized contribution but there were no Jira tickets so we decided, thanks to a conversation with @jmbowman through the Open Edx Community #incr (Slack) channel, to collaborate in the elimination of warnings listed in the Warnings Report at https://build.testeng.edx.org/job/edx-platform-python-pipeline-master/warning_5freport_5fall_2ehtml/

This PR contributes to the elimination of RemovedInDjango30Warnings, specifically the one mentioned above and reported in the Warnings Report

Changed cookie_date to http_date in the following file:

    openedx/core/djangoapps/user_authn/cookies.py

This warning occurs due to deprecation since Django 2.1: https://docs.djangoproject.com/en/2.2/ref/utils/#django.utils.http.cookie_date
2020-05-08 15:55:23 -04:00
Jansen Kantor
f4a2303013 EDUCATOR-5043: remove grades from program progress page (#23940)
* remove grades from program progress page
2020-05-08 14:46:20 -04:00
Leonardo Martinez
03c6a46e33 Update the LibraryLocator attribute from 'course' to 'library' (#23924)
This PR solves the deprecation warning found here:
https://build.testeng.edx.org/job/edx-platform-python-pipeline-master/warning_5freport_5fall_2ehtml/

Change:
(LibraryLocator(org='org', course='course'), False)
To:
(LibraryLocator(org='org', library='course'), False)
In the file:
openedx/core/djangoapps/content/block_structure/tests/test_signals.py

* LibraryLocator is from the opaque_keys.edx.locator module

See documentation:
https://pythonhosted.org/edx-opaque-keys/opaque_keys.edx.html#opaque_keys.edx.locator.LibraryLocator
2020-05-08 12:19:59 -04:00
Michael Terry
1fed93c02f Merge pull request #23946 from edx/mikix/due-on-graded-only
Only set due dates on graded content
2020-05-08 11:57:23 -04:00
Michael Terry
e521e0db25 Only set due dates on graded content
When a self paced course was published and we were configured to
automatically space out due dates among its sections, we were
accidentally setting due dates on ungraded content. Which limited
access to it.

AA-162
2020-05-08 11:10:33 -04:00
Ali Akbar
0955865fa9 Merge pull request #23885 from edx/aakbar/PROD-1478
Unauthenticated Contact Us improvements
2020-05-08 19:49:06 +05:00
Jeff LaJoie
c1130e60c4 Merge pull request #23944 from edx/jlajoie/course-update-command-fixes
Changes type of objects that get serialized, removes a problematic log statement
2020-05-08 09:22:39 -04:00
Saad Yousaf
c099932830 Merge pull request #23914 from edx/saad/PROD-1230-certificate-available-date-adr
[PROD-1230] - ADR for upcoming update for certificate_available_date.
2020-05-08 17:57:56 +05:00
Jeff LaJoie
c87269956a Changes type of objects that get serialized, removes a problematic log statement 2020-05-08 08:39:03 -04:00
Ali-D-Akbar
94907cc4a9 Unauthenticated Contact Us improvements
fix password reset page, add another test and remove typo

improve js test

add quality changes

add quality changes
2020-05-08 14:14:35 +05:00
SaadYousaf
6b7a51f86c ADR for upcoming update for certificate_available_date. 2020-05-08 04:26:10 +05:00
Matt Tuchfarber
8193763e92 Merge pull request #23931 from edx/tuchfarber/strip_phone_number
Strip non-numeric characters from phone number
2020-05-07 11:40:01 -04:00
Matt Tuchfarber
4910cfa180 Strip non-numeric characters from phone number
Allows user to type in phone number in whichever
format they prefer.
2020-05-07 10:10:42 -04:00
Waheed Ahmed
c603111895 added another test case. 2020-05-07 15:14:31 +05:00
Waheed Ahmed
05d18effde Implement both IP and email based rate limiting. 2020-05-07 15:14:31 +05:00
Waheed Ahmed
f3db71171e Fix password reset rate limiting for existing users.
PROD-1427
2020-05-07 15:14:31 +05:00
Ned Batchelder
5caf9b02fa Merge pull request #23922 from regisb/regisb/fix-offset-naive-static-assets
Fix naive offset-naive/aware error in asset compilation [CRI-191]
2020-05-06 17:13:30 -04:00
Régis Behmo
1d859569b6 Fix naive offset-naive/aware error in asset compilation
The XBlockPackageStorage used to return offset-naive datetime objects
which were compared to offset-aware objects when we ran static asset
collection:

    ./manage.py lms collectstatic

Close CRI-191
2020-05-06 18:39:46 +02:00
Jeff LaJoie
4f32e5728b Merge pull request #23600 from edx/jlajoie/AA-67
AA-67: New resolver logic for weekly highlights
2020-05-06 09:31:39 -04:00
Simon Chen
262574b815 Move all the upgrade display logic into courseware.utils 2020-05-05 17:54:22 -04:00
Adam Butterworth
a889536dbd Add the appropriate auth classes to courseware api views (#23901)
Allows users who are logged in but have not activated their accounts to be considered authenticated for the purpose of the courseware api
2020-05-05 13:37:24 -04:00
Jeff LaJoie
542905bee4 AA-67: Adds in new resolver logic for Weekly Highlights to learners 2020-05-05 10:32:18 -04:00
Gabe Mulley
8dd633b6e5 Merge pull request #23856 from edx/mulby/log-reg-failures
log registration failures
2020-05-05 08:50:07 -04:00
Gabe Mulley
9f287165bd log registration failures 2020-05-04 16:20:12 -04:00
Simon Chen
f8cc58618a Create a new plugin manager called DynamicPartitionGenerators to remove the dependency of openedx.features.content_type_gating by xmodule.partition_services 2020-05-04 11:16:26 -04:00
Kyle McCormick
ec9ac34886 Paginate course card API for Programs Learner Portal
* Pull business logic of ProgramCourseEnrollmentOverviewView
  out of view class and into utils.py.
* Add UserProgramCourseEnrollmentsView, which is a paginated
  version of ProgramCourseEnrollmentOverviewView with a
  URL that is parameterized on the user (to enable masquerading
  in MST-109).
* Add get_certificates_for_user_by_course_keys to certs API
  to make enrollments overviews REST API use fewer SQL queries.
* Document new course cards API with edx-api-doc-tools.

In a follow-up ticket, the Programs Learner Portal will switch
to the new paginatd API in order to speed up its page load.

MST-126
2020-05-04 09:26:23 -04:00
Kyle McCormick
a86576e69b Fix isort and pylint violations in program_enrollments
Run isort -rc lms/djangoapps/program_enrollments
Run pylint lms/djangoapps/program_enrollment and fix messages.

Stop pylint from complaining about DictFactoryBase instances
2020-05-04 09:26:23 -04:00
adeel khan
0262d0e3ee Merge pull request #23836 from edx/adeel/prod_1477_enable_recovery_email_for_all_learners
Removes enterprise filter for account recovery banner
2020-05-04 17:23:15 +05:00
Braden MacDonald
fe06bc872c Fix capa's static_url on devstack in new runtime 2020-05-04 09:28:37 +09:30
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Dave St.Germain
2def3f427d Fixes hidden tabs showing up in courseware MFE. TNL-7149
Refactors courseware metadata code.
Enables masquerading in the courseware metadata API.
2020-04-30 12:19:43 -04:00
David Ormsbee
d1da021d77 Merge pull request #23469 from open-craft/blockstore-race-condition
Cache Blockstore XBlock field data per thread, not per-process
2020-04-30 11:33:43 -04:00
David Ormsbee
431fdb9009 Merge pull request #23233 from open-craft/blockstore-library-links
REST API for managing Content Library bundle links
2020-04-30 11:32:48 -04:00
Waheed Ahmed
07465b2b35 Ratelimit password reset by email instead of IP.
Also changed `password_reset` endpoint rate limit configuration to
1/minute from 30/5 minutes.

PROD-1427
2020-04-30 14:50:47 +05:00
Dave St.Germain
0c67d91b16 Merge pull request #23774 from edx/dcs/tabfields
TNL-7148 -- support external links in courseware API
2020-04-29 09:31:14 -04:00
Dave St.Germain
fbc18460ca Add support for external user ids to the xblock user service. 2020-04-29 08:55:40 -04:00
Adeel Khan
9778e69c76 Removes enterprise filter for account recovery banner
Previously code was only showing banner for enterprise
learners. This patch would remove this restriction
and is available to all edX learners provided that
'enable_secondary_email_feature' is switched on.

PROD-1477
2020-04-29 17:44:25 +05:00
Robert Raposa
e63a7a4920 Revert "remove tests causing flakiness (#23827)" (#23830)
This reverts commit be1aaa00ff.
2020-04-28 17:31:45 -04:00
Robert Raposa
be1aaa00ff remove tests causing flakiness (#23827)
These removed tests can be restored once someone works out why they
were causing flakiness elsewhere and fix the problem.

Reverts tests added in:
dca50aacc3
2020-04-28 16:12:29 -04:00
David Ormsbee
617fe431e1 Merge pull request #23246 from open-craft/samuel/lx-744-more-metadata
[SE-2264] [LX-744] Return more metadata in xblock api
2020-04-28 15:10:27 -04:00
Braden MacDonald
cb58873879 Cache Blockstore XBlock field data per thread, not per-process
The cache in the previous version of this code was unwittingly being
shared among all threads, and an occasional race condition would result
in the .children field of some XBlocks containing duplicate entries.

I tried to find other ways to keep the existing cache design and let it
be shared among all the threads (which would be more efficient), but I
couldn't find any clean way of doing it (and even then, this code was
not written with the intention of being used in a multi-threaded way).
So to keep the fix simple, I made the block data cache thread-local
instead of process-local. That eliminated the bug.

Technical details:

The big challenge with this code in the first place was due to the
parse_xml API of XBlocks, which instantiates the XBlock instance and
_then_ sets field data on it and returns it, as there is no mechanism
available to distinguish that from the case of instantiating an XBlock
(using previously loaded/cached field data) and then deliberately
changing its field values. In particular, parse_xml sets the 'children'
field just by calling self.children.append(...) but never explicitly
initializes self.children to [] first, so it's necessary for the field
data store to have a mechanism for setting self.children = [] when
parsing begins, but it's hard to know "when parsing begins" in general.

This is made more challenging since the BlockstoreFieldData design ties
field data changes to the XBlock instance itself (using a weakkey), but
it's impossible to get a reference to the XBlock instance before calling
parse_xml, and since the BlockstoreFieldData design uses a pass-through
approach where fields that aren't being actively changed are read from
the cache; since it doesn't know when children is being initialized vs.
being modified, it would sometimes pass-through and start one thread's
changes with the final result from another thread.

Anyhow, the bottom line is that avoiding unintentional multithreading
here solves the problem.

If we want the field data cache to be shared among threads, it might as
well be rewritten to use memcached and shared among all processes too.
That would be a very good performance boost but would take up a lot more
memory in memcached. Also the rewrite may be challenging due to the
aforementioned nuances of the XBlock parse_xml / construct_xblock /
add_node_as_child APIs. Perhaps modifying the runtime to use a
completely separate fielddata implementation for parsing vs. loading a
parsed+cached XBlock would do it.
2020-04-28 12:01:44 -07:00
Ahtisham Shahid
f14946d1de Merge pull request #23749 from edx/ahtisham/PROD-1476
Disabled copy/paste in confirm email
2020-04-28 13:16:01 +05:00
Ahtisham Shahid
8af94ec72a Disabled copy/paste in confirm email
Created sorting for email field

updated tests

Fixed sorting issue in registration form

Fixed sorting issue in registration form

Fixed sorting issue in registration form

Added missing items in env and updated order logic

Added missing items in env and updated order logic
2020-04-28 11:51:01 +05:00
Waheed Ahmed
dca50aacc3 added tests for revoke program cert task 2020-04-27 16:35:36 +05:00
Waheed Ahmed
6a7dc067da Add revoke program certificate task.
Upon invalidating course certificate, revoke related program certificates
as well.

PROD-1271
2020-04-27 16:35:36 +05:00