Commit Graph

19803 Commits

Author SHA1 Message Date
Michael Terry
cb1bb7fa64 test: switch default test store to the split store
It's long past time that the default test modulestore was Split,
instead of Old Mongo. This commit switches the default store and
fixes some tests that now fail:
- Tests that didn't expect MFE to be enabled (because we don't
  enable MFE for Old Mongo) - opt out of MFE for those
- Tests that hardcoded old key string formats
- Lots of other random little differences

In many places, I didn't spend much time trying to figure out how to
properly fix the test, and instead just set the modulestore to Old
Mongo.

For those tests that I didn't spend time investigating, I've set
the modulestore to TEST_DATA_MONGO_AMNESTY_MODULESTORE - search for
that string to find further work.
2022-02-04 14:32:50 -05:00
SaadYousaf
87b029f293 fix: add investigation logs for course import. 2022-02-04 15:45:57 +05:00
SaadYousaf
314aa86f1e fix: remove investigation logs 2022-02-04 12:25:56 +05:00
SaadYousaf
52db919b6c fix: add further additional logs for course import 2022-02-03 12:25:29 +05:00
SaadYousaf
7a4ed05279 fix: add additional logs to investigate import issue 2022-02-02 15:07:38 +05:00
Zainab Amir
a717dfd50e fix: ensure redirect url is whitelisted 2022-02-01 15:10:23 +05:00
Maria Grimaldi
07f88fab4b fix: avoid raising error when auth_entry is None (#29787)
This commit avoids raising AuthEntryError when auth_entry is None.
At some point of the authentication flow, when the auth_entry is
missing from the auth URL (eg. auth/login/tpa-saml/?idp=idp), the
request session stores auth_entry: None causing this edited line to fail
which stops the login from completing.
2022-01-31 14:36:44 -05:00
Nathan Sprenkle
1212e3550c feat: ora staff grader backend (#29828)
- Adds Enhanced Staff Grader (ESG) backend-for-frontend (BFF) in `lms/djangoapps/ora_staff_grader`
    - Adds routing to ESG BFF at `{lms_url}/api/ora_staff_grader/*`
    - Adds mock implementation routing at `{lms_url}/api/ora_staff_grader/mock/*`
    - Adds `ORA_GRADING_MICROFRONTEND_URL` setting for routing to ESG microfrontend (MFE)
- Updates to the teams app:
    - Add`get_teams_in_teamset` to the teams API.
    - Add `get_team_names` to teams service.
- Adds `openassessment.staffgrader` app for appropriate ORA migrations.
- Modifies management commands for creation of users.
- Updates test factory to return display org with course overview.

Co-authored-by: jansenk <jkantor@edx.org>
Co-authored-by: Leangseu Kim <lkim@edx.org>
Co-authored-by: Ben Warzeski <bwarzeski@edx.org>
2022-01-31 11:09:41 -05:00
Felipe Montoya
c807af628f Merge pull request #29449 from eduNEXT/MJG/1st_filters_batch
[BD-32] feat: add first batch of Open edX Filters
2022-01-26 11:35:00 -05:00
Maria Grimaldi
f29a4eef68 feat: add first batch of Open edX Filters
* Add PreEnrollmentFilter
* Add PreRegisterFilter
* Add PreLoginFilter
2022-01-26 11:45:44 -04:00
alangsto
0e7534d730 fix: enrollment should still display if IDV is disabled (#29819)
MST-1317. The enrollment mode of a learner should still display on the course listing, even if IDV is disabled. Right now, all enrollment messaging is disabled if IDV is turned off, as we are no longer returning the verifications status for a learner in that case. We should still return the enrollment mode if IDV is disabled, but exclude any IDV messaging.
2022-01-26 10:14:33 -05:00
Peter Pinch
4f58ed4f25 Merge pull request #29260 from open-craft/jill/BD-13-sandbox
[BD-13] refactor: deprecates ModuleSystem properties related to code sandboxing
2022-01-26 09:57:41 -05:00
SaadYousaf
739083e301 fix: remove check for default values for video component when exporting. 2022-01-26 18:14:25 +05:00
Attiya Ishaque
60f3623066 fix: [VAN-823] Remove Authn MFE Waffle Flag (#29778) 2022-01-26 16:02:53 +05:00
Jillian Vogel
23a0d9ffb1 test: fixes safe_exec test TestSafeOrNot
so that both tests succeed on local devstack and in CI.
2022-01-25 14:49:31 +10:30
Jillian Vogel
57b390f8e2 refactor: removes calls to deprecated properties from source and tests. 2022-01-25 14:49:21 +10:30
Jillian Vogel
2173a98ef8 refactor: deprecates ModuleSystem properties for code sandboxing and cache
* Deprecates ModuleSystem can_execute_unsafe_code, get_python_lib_zip and cache properties
* Adds a new CacheService and SandboxService to provide the deprecated property
* Adds tests for the added CacheService and SandboxService
* Updates the ModuleSystemShim tests in Lms and Studio
2022-01-25 14:42:39 +10:30
Simon Chen
895cc10c1b fix: do not validate proctoring_provider if proctoring is disabled (#29803)
Co-authored-by: Simon Chen <schen@edx-c02fw0guml85.lan>
2022-01-21 12:45:43 -05:00
Jillian Vogel
5dedba8c8e temp: adds mako templates and dirs to Studio test env
The content library tests were failing to locate templates when
rendering XBlocks, but since these tests are skipped in CI, the issue
went undetected.

This fix is marked temporary because a proper fix involves adding
lms/templates to the cms.envs.test MAKO_TEMPLATE_DIRS_BASE list. This
was tried, and caused unrelated tests to fail, and so we took this
approach instead. See PR for full details.
2022-01-20 10:35:59 +10:30
Dillon Dumesnil
e458c7eb36 Merge pull request #29747 from openedx/ddumesnil/goal-celly-modal-aa-1138
feat: AA-1138: Adds ability to have Weekly Goal Celebration Modal in MFE

Adds celebrate_weekly_goal to the CourseEnrollmentCelebration and includes logic
for only returning True if the db field is true and the learner has hit their goal
this week. Adds ability to set to false via the API already used by the frontend.
Default db value is False, but all new enrollments after merge will be set to True.
2022-01-18 06:13:43 -08:00
Jillian Vogel
ca1a44f15d Merge branch 'master' into chris/LX-2398 2022-01-17 11:11:59 +10:30
Dillon Dumesnil
7b1fead04c feat: AA-1138: Adds ability to have Weekly Goal Celebration Modal in MFE
Adds celebrate_weekly_goal to the CourseEnrollmentCelebration and includes logic
for only returning True if the db field is true and the learner has hit their goal
this week. Adds ability to set to false via the API already used by the frontend.
Default db value is False, but all new enrollments after merge will be set to True.
2022-01-14 13:59:22 -05:00
SaadYousaf
2c6989feab fix: correct studio sequence navigation bar with correct Next and Previous button actions 2022-01-12 16:20:05 +05:00
Kira
4d1275a521 feat: associate name to username in saml config 2022-01-11 09:19:37 -05:00
Jawayria
7f5b4a6a47 chore: removed 'wrong-import-order' from disabled imports (#29365)
* chore: removed 'wrong-import-order' from disabled imports
2022-01-06 19:14:51 +05:00
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
ChrisChV
0ad9959667 feat: Wrap the choice label with a <div> on choicegroup.html 2021-12-21 14:01:01 -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