Commit Graph

19277 Commits

Author SHA1 Message Date
Tim McCormack
1e55b4e1b6 feat: Add utility for logging sensitive information using encryption (#29682)
Introduces `common.djangoapps.util.log_sensitive module` for
public-key encryption of sensitive debug information in log
messages, including CLI commands for generating keys and
decrypting log output.

Also:

- Adds `PyNaCl` to base requirements for encryption tools
- Requirements upgrade

ref: ARCHBOM-1940
2022-01-05 21:37:45 +00:00
Binod Pant
33437e7fef feat: choose signing cert explicitly in saml metadata ENT-677 (#29704)
* feat: choose signing cert explicitly in saml metadata

when parsing, we want to explicitly choose the use='signing' cert instead of accidentally choosing the encryption one

ENT-677

* test: test for parse_metadata_xml

* feat: also address case when signing key is absent

in this case we consider the 'use'-less keydescriptior as if it's for both signing and encryption

* test: test case for missing use=signing attribute

* test: fix test failure
2022-01-05 16:18:01 -05:00
Dillon Dumesnil
bbfdb3376e Merge pull request #29713 from edx/ddumesnil/fix-max-width-text-input-aa-1114
fix: AA-1114: Set a max width on Text Input answers
2022-01-05 10:41:08 -08:00
Dillon Dumesnil
027a08ea3d fix: AA-1114: Set a max width on Text Input answers
We saw a bug where on mobile devices or smaller web browser windows
the input text field could stretch beyond the visible screen. By
setting the max width, we will always contain it to the size of its
parent element.
2022-01-05 09:52:18 -08:00
Umar Asghar
4f40e44627 feat: add API endpoint for change email settings (#29498) 2021-12-23 18:04:05 +05:00
Ned Batchelder
66eae81add docs: comments about how pytest finds settings (#29623)
It took a while for me to understand why my setup.cfg setting was only
applying to some tests.  Hopefully these comments will save someone else
some confusion.
2021-12-21 10:47:59 -05:00
Phillip Shiu
3c17874b9d fix: [REV-2492] remove graded content unfbe bullet (#29645) 2021-12-20 15:57:16 -05:00
Jillian Vogel
31827bc3b1 refactor: removes deprecated calls to runtime.xqueue from code and tests
* Uses the XQueueService object from the ModuleSystem in the LoncapaSystem
  instead of the dict of xqueue-related values.
* Adds a StubXQueueService for testing.
2021-12-20 15:41:42 +01:00
Jillian Vogel
1974bacadd refactor: deprecates runtime.xqueue in favor of the XQueueService
* Deprecates ModuleSystem.xqueue property
* Adds new XQueueService to provide the deprecated property values to the LMS runtime
  (Studio does not need the XQueueService.)
* Adds tests for new service and updates the ModuleSystemShim tests in LMS and Studio
* Fixes existing tests.
2021-12-20 15:41:42 +01:00
Jillian Vogel
f828d89feb refactor: use UserService to remove deprecation warnings
from code and tests.
2021-12-20 15:41:25 +01:00
Jillian Vogel
e378e42bfa refactor: deprecate user-related ModuleSystem attributes
Deprecates these ModuleSystem attributes in favor of the user service:

* user_location
* get_real_user
* get_user_role

Related changes:

* Stores the user location into DjangoXBlockUserService's optional attribute as request_country_code
* Uses the student model's user_by_anonymous_it to fetch the (cached) real user
* Updates affected tests
2021-12-20 15:41:25 +01:00
Bianca Severino
93e5d6ce50 Merge pull request #29544 from edx/bseverino/remove-idv-upgrade
[MST-1195] Hide course upgrade on dashboard if there is no SKU
2021-12-16 12:02:53 -05:00
Bianca Severino
ae8e9672a1 feat: hide course upgrade on dashboard if there is no SKU 2021-12-16 11:19:31 -05:00
Muhammad Soban Javed
ac7a42d196 Merge pull request #29520 from edx/iamsobanjaved/pytest-warnings-gha
test: save pytest warning reports to GHA artifacts
2021-12-16 14:10:15 +05:00
edX Transifex Bot
b401ecb3e7 geoip2: update maxmind geolite country database 2021-12-15 16:19:32 -05:00
Ned Batchelder
e39f9c503a build: suppress Django deprecation warnings (#29528)
Suppress them both in tests (via setup.py and pytest.ini)
and in management command & application runs
(via logsettings.py).

Developers aren't looking at these warnings; they'll be dealt with in a
formal process for upgrading Django.  Suppress them for now so that
important information isn't lost in the noise.
2021-12-15 10:45:12 -05:00
Soban Javed
b4ac8d284a test: save pytest warning reports to GHA artifacts
- add pytest_hooks import back in common/lib/conftest.py. This import was removed during refactoring work
2021-12-15 17:06:40 +05:00
Jawayria
833ce7d586 Merge pull request #29570 from edx/jawayria/fix-url-common
fix: fixed RemovedInDjango40 warnings in common
2021-12-15 13:55:37 +05:00
Jawayria
bd5e00b725 fix: fixed RemovedInDjango40 warnings in common 2021-12-14 19:55:01 +05:00
John Nagro
3873ff7de9 feat: avoid certain strings in the suffix appended to edX usernames (#29524)
ENT-2824
2021-12-13 15:32:51 -05:00
Jawayria
4b69973701 Merge pull request #29367 from edx/jawayria/bom-2606-1
chore: applied lint-amnesty on common/djangoapps/{edxmako, split_modulestore_django, static_replace, third_party_auth, track}
2021-12-13 21:58:43 +05:00
Jawayria
e7c62ff61b Merge pull request #29368 from edx/jawayria/bom-2606-2
chore: Applied lint-amnesty on common/djangoapps/student
2021-12-13 21:58:31 +05:00
Jawayria
4c40b1d8f4 Merge pull request #29369 from edx/jawayria/bom-2606-3
chore: Applied lint-amnesty on common/djangoapps/course_modes
2021-12-13 21:58:09 +05:00
Jawayria
9037f6fdfc Merge pull request #29370 from edx/jawayria/bom-2606-4
chore: Applied lint-amnesty on common/djangoapps/{entitlements, util}
2021-12-13 21:57:57 +05:00
Jawayria
9974ed1856 chore: Applied lint-amnesty on common/tests 2021-12-13 20:56:42 +05:00
Jawayria
f4b974a5ff chore: Applied lint-amnesty on common/djangoapps/{entitlements, util} 2021-12-13 20:56:24 +05:00
Jawayria
2b0012d3ee chore: Applied lint-amnesty on common/djangoapps/course_modes 2021-12-13 20:56:04 +05:00
Jawayria
59039597ab chore: Applied lint-amnesty on common/djangoapps/student 2021-12-13 20:55:40 +05:00
Jawayria
ce26c8476d chore: Applied lint-amnesty on common/djangoapps 2021-12-13 20:53:36 +05:00
Andy Shultz
d80a897ae4 chore: update proctoring to 4.8.1
this completes the drop of the old attempt history table

MST-963
2021-12-08 10:54:59 -05:00
Andrew Shultz
0885837775 Merge pull request #29527 from edx/ashultz0/proctoring-480
chore: update edx-proctoring to 4.8.0
2021-12-08 09:36:52 -05:00
edX requirements bot
bb20b17428 Python Requirements Update (#29516)
* chore: Updating Python Requirements

* fix: fix pylint issues

Co-authored-by: Mohammad Ahtasham ul Hassan <mohammad.ahtasham@arbisoft.com>
2021-12-08 14:13:27 +05:00
Andy Shultz
ebd037d895 chore: update edx-proctoring to 4.8.0
removing use of old history table

skips migrations in sync test pending the migration catching up next release

part of MST-963
2021-12-07 14:49:31 -05:00
julianajlk
5de4264c84 fix: Update Track Selection to support verified only mode (#29497)
REV-2450
2021-12-07 08:14:49 -05:00
Zainab Amir
5f77890c58 refactor: update account verification messages (#29329)
* refactor: update account verification messages

* fix: quality check
2021-12-07 17:16:16 +05:00
Usama Sadiq
780a6f3c2d Revert "chore: install codejail from pypi (#29481)" (#29501)
This reverts commit 21551095ac.
2021-12-02 22:19:15 +05:00
Mohammad Ahtasham ul Hassan
21551095ac chore: install codejail from pypi (#29481)
* chore: install codejail from pypi

* chore: Updating Python Requirements

* chore: Updating Python Requirements

* fix: fixed failing tests

* fix: fixed pytest failures

* fix: fixed failing test bug

* Update mocks.py

Co-authored-by: edX requirements bot <testeng+edx-requirements-bot@edx.org>
2021-12-02 17:07:29 +05:00
Jillian Vogel
ad5ad72273 [BD-13] Deprecate ModuleSystem.render_template (fixed) (#29354)
* refactor: deprecates ModuleSystem.render_template

in favor of the added MakoSystem render_template method.

Related changes:
* Adds the MakoService to the StudioEditModuleRuntime,
  PreviewModuleSystem, LmsModuleSystem, and XBlockRuntime
* MakoService constructor takes a `namespace_prefix` string, so that the
  CMS PreviewModuleSystem can render to LMS templates, without needing
  the special render_from_lms helper method.
* ModuleSystem.render_template becomes a read-only property, so the
  constructor calls and test module systems are updated accordingly.
* Adds tests for the MakoService and module system shims.

(cherry picked from commit 457f959356)

* refactor: use MakoService.render_template to remove deprecation warnings

from block code.

(cherry picked from commit 8d62d337f5)

* refactor: use MakoService.render_template to remove deprecation warnings

from test code.

(cherry picked from commit 26b43465a4)

* test: Adds a test to verify the bug introduced by the previous changes

The AuthoringMixin is automatically added to all XBlocks (see
settings.XBLOCK_MIXINS), and AuthoringMixin.visibility_view expects the
"mako" service.

This test verifies the bug by testing the PureXBlock, which does not
require the "mako" service, and so fails when the visibility_view is
rendered.

* fix: AuthoringMixin needs mako service

which fixes the visibility_view for XBlocks which don't explicitly
require the mako service.

Also removes the unneeded class property _services_requested from
AuthoringMixin and StudioEditableBlock. This property is better provided
by the XBlockMixin class.
2021-11-29 14:42:52 -05:00
Braden MacDonald
448b75fe7f Add a data migration to copy all course index data into MySQL (Take 3) (#29413)
* feat: Add a data migration to copy all course index data into MySQL

* fix: Don't break the data migration if a course has no published version
2021-11-29 11:27:49 -05:00
edX Transifex Bot
5c4042e6f0 geoip2: update maxmind geolite country database 2021-11-25 02:09:02 +05:00
connorhaugh
2ebfe47077 fix: remove slashmark 2021-11-22 13:58:34 -05:00
connorhaugh
74bda16638 Revert "feat: Add a data migration to copy all course index data into MySQL (#29293)" (#29387)
This reverts commit b5299674d2.
2021-11-22 11:59:56 -05:00
Braden MacDonald
b5299674d2 feat: Add a data migration to copy all course index data into MySQL (#29293) 2021-11-22 10:34:25 -05:00
Kshitij Sobti
e8e8f4acbe feat!: Change the way tabs are ordered [BD-38] [TNL-9174] [BB-5076] (#29262)
* feat!: Change the way tabs are ordered
The change imposes a new ordering for tabs based on their new priority. When reordering tabs, this ordering will be maintained.

* fix: Apply suggestions from code review

Co-authored-by: Farhaan Bukhsh <farhaan@opencraft.com>

* fix: review feedback

Co-authored-by: Farhaan Bukhsh <farhaan@opencraft.com>
2021-11-22 11:17:30 +05:00
Adeel Ehsan
66654b2edb feat: don't allow account creation for secondary emails (#28880)
VAN-726
2021-11-19 17:06:24 +05:00
Aarif
39fe1a20e4 feat: move unit tests to github actions on self-hosted runners (#28873) 2021-11-18 19:09:31 +05:00
edX Transifex Bot
a60f9ff82d geoip2: update maxmind geolite country database 2021-11-18 02:13:52 +05:00
Justin Lapierre
f6f3a79a15 Revert "[BD-13] Deprecate ModuleSystem.render_template" 2021-11-16 15:16:08 -05:00
Piotr Surowiec
4bf829dcbd fix: do not remove comments from XML during course import (#28557)
This is a follow-up to edx#1087, which reverted this change.
According to the PR comments, parsing strings with XML comments inside them was
causing errors. This does not seem to be the case anymore - these strings are
just hidden when the block is rendered, but they are not breaking XBlocks.
This also handles (ignores) the comments that could be added directly to the
LibraryContentBlock in the XML export by users.
2021-11-16 12:42:08 -05:00
edX Transifex Bot
52a2da61f1 geoip2: update maxmind geolite country database 2021-11-11 02:18:37 +05:00