Commit Graph

3988 Commits

Author SHA1 Message Date
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
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
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
toxinu
a68b603638 Can only check user specific permissions if logged in 2020-04-27 17:21:13 +09:00
Ned Batchelder
82159ae168 Merge pull request #23790 from eduNEXT/lmm/fix_comment
Fix docstring of retrieve_last_sitewide_block_completed
2020-04-25 13:11:57 -04:00
Tim McCormack
7a406d4417 Cache site config per-request to reduce DB queries from template render (#23791)
ARCHBOM-1139: We were seeing about 150 queries to the django_site table
and over 200 to memcached just to load the login page. A lot of these
are via mako template rendering, but there are other sources, and this
will hopefully nip it in the bud.
2020-04-23 15:37:45 +00:00
stvn
0fa6099802 Get upgrade offer banner HTML in courseware API
for use in the Learning MFE.
2020-04-22 14:14:55 -07:00
Luis Moreno
3d8875d505 Fix docstring of retrieve_last_sitewide_block_completed 2020-04-22 12:45:22 -04:00
Dave St.Germain
1f71b7dc4b TNL-7148
This adds another field to the CourseOverviewTab model to support external links.
2020-04-21 12:16:24 -04:00
Farhanah Sheets
602ebfaf1c Merge pull request #23757 from edx/fsheets/contact-us-hackathon-2
Update wording for clarity and bug fix for API expectations
2020-04-21 10:49:44 -04:00
Zia Fazal
24c0fb2875 Merge pull request #23764 from edx/ziafazal/ENT-2798
ENT-2798: Added more info to log in SSO request/response flow
2020-04-21 16:57:31 +05:00
George Babey
5d62456250 Merge pull request #23671 from open-craft/jill/samesite-cookies
SE-2320 Adds django-cookies-sameseite middleware
2020-04-20 13:15:26 -04:00
zia.fazal@arbisoft.com
f70390d70f Added more info to log in SSO request/response flow
Added more info to log in SSO request/response flow
Fixed django admin links on model's link fields which are broken due to django 2.2 upgrade.
ENT-2798

Fixed quality violations and unit test

Fix xsscommitlint violation

Fixed pylint violation
2020-04-20 14:38:51 +05:00