Commit Graph

58450 Commits

Author SHA1 Message Date
stvn
21dce731f9 fix: Allow capa_problem optioninput option with empty text
This fixes TNL-7973 [1].

Background
----------

> An alert was sent out because a malformed capa problem caused block
> transformers to fail to run.

> This specific error/alert was triggered when an optionresponse problem
> lacked text. The authoring-based fix is to edit the offending
> option-response problem to remove the empty option.

> Expected behavior: We should be able to keep the error local to the
> ProblemBlock and not blow up the whole course publish block
> transformer collection process.

> This is a really easy error for authors to make, and the consequences
> to them (one problem doesn’t work) are disproportionate to the
> consequences [...] (alerting triggered).

- [1] https://openedx.atlassian.net/browse/TNL-7973
2021-04-02 14:36:20 -07:00
Feanil Patel
9f4a8e6724 Merge pull request #27233 from edx/feanil/flag_management
feat!: Replace logging WaffleSwitch with a django settinge.
2021-04-02 15:12:11 -04:00
Feanil Patel
ba4d98898e Merge pull request #27231 from edx/feanil/more_safe_sessions_updates
fix: Reduce safe-sessions false alarms.
2021-04-02 14:45:22 -04:00
Feanil Patel
8e7144ae2e revert: "test: Update query counts."
This reverts commit c2eabf6cca.

We are changing this from a waffle setting to a django setting so we can
undo this query count bump.
2021-04-02 14:42:55 -04:00
Feanil Patel
455033458c feat!: Replace logging WaffleSwitch with a django settinge.
This was initially introduced as a temporary flag to be able to get more
information.  But if we get this kind of issue again, we'll need
something like this logging to determine the source of the session
collision.  Rather than removing the code and adding it back in later,
convert this temporary switch into an opt-in setting that can be used
again in the future.

BREAKING_CHANGE: 'safe_session.log_request_user_changes' switch no
longer exists and is replaced with the 'LOG_REQUEST_USER_CHANGES' django
setting which defaults to 'False'
2021-04-02 14:20:07 -04:00
Feanil Patel
4f725aa152 test: Add a test for setup_masquerade.
Test to verify the side-effects of calling this function since we now
rely on one of them in the SafeSessionMiddleware.
2021-04-02 14:19:10 -04:00
Feanil Patel
c45ffd7509 test: Test login redirects prefer session cookies.
Add a test to ensure that the login page redirect as long as we have a
valid session even if we have expired on non-existent JWT cookies.
2021-04-02 14:19:10 -04:00
Feanil Patel
118f095110 fix: Assume logged in if user has a valid session.
Previously they also had to have a valid JWT cookie which led to a weird
corner case where a user was logged in but still showed the login form
resulting in some confusion and odd behavior.

This change gives precedence to the session token to determine whether
or not someone is logged into the LMS but ensures that if you go through
the login flow, you refresh your JWT cookies. This should not cause any
breakage for MFE flows that might redirect to the LMS login page since
the JWT would get refreshed if it's out of date but the session is
valid.
2021-04-02 14:19:10 -04:00
Feanil Patel
23f2b758d4 fix: Print more stack frames on requset tracing.
Six frames was not enough because for DRF views the request gets wrapped
in a proxy object and so we need more of the stack to see what part of
the code we're in that actually invokes the use change.
2021-04-02 14:19:07 -04:00
David Ormsbee
d2389fb7fb fix: Don't break export when transcript is Latin-1 encoded.
Video SJSON transcripts are supposed to be UTF-8 encoded, but SJSON
is an ad hoc thing we made up to make it easier to build the
transcripts viewer in the VideoBlock, and it's not well specified.
Prior to this commit, if you had an SJSON file with Latin-1 encoded
text outside the standard ASCII range (e.g. û), then we'd error out
while trying to export it.

This was blocking an effort to export some Old Mongo courses (TNL-8007).
2021-04-02 13:33:16 -04:00
Awais Jibran
2641336fc1 Update error message (#27232) 2021-04-02 22:05:59 +05:00
Michael Terry
b897bd4b44 Merge pull request #27230 from edx/mikix/video-completion-typo
fix: fix typo that prevented video completion working as intended
2021-04-02 12:30:51 -04:00
Asad Iqbal
82c90b40b0 Added setting to manage from_email address (#24951)
Co-authored-by: asadiqbal08 <asad.iqbal@arbisoft.com>
2021-04-02 12:08:51 -04:00
Michael Terry
5169d70b14 fix: fix typo that prevented video completion working as intended
Neither of these settings were being correctly set:
* COMPLETION_BY_VIEWING_DELAY_MS
* COMPLETION_VIDEO_COMPLETE_PERCENTAGE

AA-743
2021-04-02 11:50:19 -04:00
Bianca Severino
3712e0ee2e Merge pull request #27205 from edx/bseverino/idv-validate-image-data
[MST-718] Validate the media type of uploaded IDV images
2021-04-02 11:38:47 -04:00
Nathan Sprenkle
c97932fa99 fix: add missing protocol to web link for assets (#27220)
* fix: add missing protocol to web link for assets

* test: fix asset path test

* refactor: update asset web URL to use urljoin
2021-04-02 11:13:57 -04:00
Bianca Severino
4fc5713792 fix: validate the media type of uploaded IDV images 2021-04-02 10:49:08 -04:00
Jawayria
de2a28bd82 Merge pull request #26598 from edx/jawayria/bom-2408-1
BOM-2408: Removed unused imports from openedx/core/djangoapps/{api_ad…
2021-04-02 19:38:00 +05:00
Jawayria
b899e6bced Merge pull request #26595 from edx/bom-2352-10
BOM-2352: Removed unused imports from lms/envs
2021-04-02 19:37:46 +05:00
Ben Holt
ec3c31eb05 feat: added another 'Date' expose-headers for outline api clients (#27221)
Exposed the Date header on the outline api so clients can accurately compute times relative to the dates returned by the API; this was previously done with the course API (#26979)

Browser time is notoriously unreliable for this, especially for a Learner-facing countdown call-to-action based on the access expiration date. (REV-2126)

Using the Date header for this allows the client to make use of information that is already sent, does not require additional calls nor modifying the API, and could be generalized to more or all our APIs without modifying them.
2021-04-02 10:37:19 -04:00
AsadAzam
c4da6c1fe4 Display import errors to user (#27147)
* Display import errors to user

* Refactored

* Refactored

* Refactored

* Fixed quality

* Fixed quality

* Refactored code

* Fixed message

* Refactored code
2021-04-02 18:53:39 +05:00
Jawayria
42e7576500 refactor: Removed unused imports
Removed unused imports from lms/envs
2021-04-02 18:30:19 +05:00
Jawayria
55b692aede refactor: Removed unused imports
Removed unused imports from openedx/core/djangoapps/{api_admin, catalog, ccxcon, certificates}
2021-04-02 18:28:16 +05:00
Jawayria
c64d6ab1f0 Merge pull request #26594 from edx/jawayria/bom-2352-9
BOM-2352: Removed unused-imports from lms/djangoapps/verify_student
2021-04-02 18:25:58 +05:00
Ali-D-Akbar
49315ac6b5 refactor: update contact us form 2021-04-02 18:02:17 +05:00
Jawayria
3743aa7dc8 BOM-2352: Removed unused-imports from lms/djangoapps/verify_student 2021-04-02 17:15:14 +05:00
Saleem Latif
d69b8f3941 Merge pull request #27227 from edx/saleem-latif/ENT-4310
Updated edx-enterprise version to 3.21.0
2021-04-02 16:32:03 +05:00
Awais Jibran
8023bbc1af Log Errors + Warnings. (#27210) 2021-04-02 16:02:46 +05:00
edX requirements bot
89014ca68d Updating Python Requirements 2021-04-02 15:46:49 +05:00
Saleem Latif
e5fd7dcbab Updated edx-enterprise version to 3.21.0 2021-04-02 14:54:36 +05:00
edx-pipeline-bot
48a9b042b8 Merge pull request #27225 from edx/private_to_public_2136cde
Mergeback PR from private to public.
2021-04-02 04:18:28 -04:00
Azan Bin Zahid
2136cde713 Merge pull request #226 from edx/im-security-13
Incident Management Security Fix 13
2021-04-02 12:30:04 +05:00
Nizar Mahmoud
4cb4be6afe feat: associates user by email for oauth when tpa is required
This change associates users signing in using oauth providers when tpa is required, verifying that only a single database user is associated with the email.

For more information as to why this was added in a separate pipeline, check edx-platform#25935.
2021-04-02 11:32:58 +05:00
Robert Raposa
8ef8b35a54 docs: update toggle docs
A variety of updates were made to improve the toggle documentation:
* Added comments to help ensure that the waffle(), waffle_switches(),
  waffle_flags() anti-pattern won't be contagious (copied).
* Some minor toggle_description updates.
* Removed empty toggle_target_removal_date annotations for
  non-temporary toggles.
* Removed empty optional toggle_warnings annotations.
* Removed empty optional toggle_tickets annotations.
* Removed deprecated toggle_category, toggle_status,
  and toggle_expiration_date annotations.
* Fixed some indents, use cases, and implementations.

ARCHBOM-1721
2021-04-01 21:58:29 -04:00
Feanil Patel
5b7caf45d6 fix: Don't log warnings on logout.
When a user logs out, there are warnings logged right now because the
session user_id mismatches(it becomes None on logout).  Previously we
would log the request mismatch on debug and the session mismatch as
normal.

This change will result in us logging nothing if the session change is
not abnormal.
2021-04-01 16:42:21 -04:00
Matthew Piatetsky
16634f9cab Merge pull request #27201 from edx/AA-727
[AA-727] Ensure that course staff can see course outline content when masquerading as a learner
2021-04-01 14:43:16 -04:00
M. Zulqarnain
072b6b8875 Revert "chore: Unpin python-dateutil (#27196)" (#27217)
This reverts commit 40878cd554.
2021-04-01 23:32:51 +05:00
Bianca Severino
fcbe81a397 Merge pull request #27219 from edx/bseverino/proctoring-3.8.1
Upgrade edx-proctoring to 3.8.1
2021-04-01 13:11:19 -04:00
Bianca Severino
735fdabc39 fix: upgrade edx-proctoring to 3.8.1 2021-04-01 12:31:22 -04:00
Adeel Ehsan
84aca220b8 Merge pull request #27179 from edx/aehsan/van-401/tpa_auth_context_updated
skip hinted login field added in tpa context
2021-04-01 20:08:29 +05:00
Matthew Piatetsky
cbb84fef74 fix: ensure that course staff can see course outline content when masquerading as a learner
AA-727
2021-04-01 10:55:22 -04:00
M. Zulqarnain
40878cd554 chore: Unpin python-dateutil (#27196) 2021-04-01 19:53:02 +05:00
Binod Pant
ddbac9ea33 feat: upgrade enterprise for ENT-4222 part 1 (#27215) 2021-04-01 10:47:47 -04:00
Usama Sadiq
e9f9fcb17b refactor: Ran pyupgrade on openedx/core/djangoapps/user_api
Co-authored-by: Muhammad Soban Javed <58461728+iamsobanjaved@users.noreply.github.com>
2021-04-01 19:34:01 +05:00
Usama Sadiq
24272e5caa refactor: ran pyupgrade on openedx/core/djangoapps (#26956)
Ran pyupgrade on openedx/core/djangoapps/{system_wide_roles, theming}
2021-04-01 19:27:38 +05:00
Christie Rice
b8afc30079 refactor: Combine checks for allowlist and regular certificates (#27204)
MICROBA-1039
2021-04-01 10:00:56 -04:00
Jawayria
105f7701b3 build: Updated PR title 2021-04-01 18:22:27 +05:00
edX cache uploader bot
c4a905352a Updating Bokchoy testing database cache (#27214) 2021-04-01 18:05:19 +05:00
Justin Hynes
346fe90002 chore: remove cert_allowlist_generation management command
[MICROBA-1100]
* Remove `cert_allowlist_generation` management command. This has been replaced by the `cert_generation` management command which can handle generation of allowlist and v2 certificates.
* Remove AllowListGenerationConfiguration configuration model.
2021-04-01 08:53:14 -04:00
Justin Hynes
e4206265cc Merge pull request #27200 from edx/jhynes/microba-1100-cert-generation-mgmt-cmd
feat: Update `cert_generation` mgmt command to read arguments from config model
2021-04-01 08:23:49 -04:00