Commit Graph

9463 Commits

Author SHA1 Message Date
SaadYousaf
782ee338c9 fix: remove pre tag processing for course import 2022-02-21 16:29:01 +05:00
SaadYousaf
65f7800083 refactor: cleanup investigation logs 2022-02-21 13:28:39 +05:00
Carlos Muniz
37bf73ca50 refactor: Replace videosequence & problemset (#29905)
`videosequence` and `problemset` have been replaced with `sequential`.

`problemset` and `videosequence` are old-but-not-entirely-unused aliases to the `sequential` block type (in Studio-speak, "Subsection").
Since [these block types have been removed from the 6 courses that used them](https://openedx.atlassian.net/browse/DEPR-151?focusedCommentId=588197), this ticket removes the support for the `problemset` and `videosequence` block-types.

For more information, see ticket: [DEPR-151](https://openedx.atlassian.net/browse/DEPR-151)
2022-02-16 10:21:31 -05:00
Bianca Severino
af81b3a609 chore: replace integrity signature flag with django setting 2022-02-15 09:57:00 -05:00
Carlos Muniz
8e8d8404be Carlos muniz/symmath removal unrevert (#29912)
* Revert "Merge pull request #29909 from openedx/revert-29869-Carlos-Muniz/symmath-removal"

This reverts commit 8c0db8ddff, reversing
changes made to 1156c62014.

* fix: Remove misplaced `-e`

`-e` was wrongfully placed in front of `common/lib/sandbox-packages`,
which may have most likely been causing the edxAPP to break.

* fix: Change regex to apply to right dirs

`py38.txt` does not include `common/lib/xmodule` so it doesn't match the
regex. Therefore, it never got its lines in `common/lib/sandbox-packages`
fixed. If we change the regex to match any `common/lib/<packagename>` it
should work correctly.
2022-02-14 10:26:40 -05:00
Michael Terry
e81c4fe49d Merge pull request #29911 from openedx/mikix/more-old-mongo-test-cleanup
test: more Old Mongo removal from tests
2022-02-11 15:10:45 -05:00
Michael Terry
b905de757b test: more Old Mongo removal from tests
Convert more tests from MONGO_AMNESTY to SPLIT modulestores.

This is in preparation for just wholesale denying access to Old
Mongo, so I either converted tests to split or just deleted some
test variants that were Old Mongo specific. (e.g. ddt lines)
2022-02-11 14:50:30 -05:00
Phillip Shiu
6ac1dd688a Revert "Remove symmath from edx-platform" 2022-02-11 10:30:08 -05:00
Carlos Muniz
a01a7ad416 feat: Update openedx-calc==3.0.1
This allows common/lib/capa/capa/responsetypes.py to not have to
change.
2022-02-10 15:06:20 -05:00
Carlos Muniz
675486a174 fix: Correct path to symmath function 2022-02-10 15:06:20 -05:00
Carlos Muniz
18e4c1cec4 refactor: Remove symmath from common/lib 2022-02-10 14:55:22 -05:00
Pooja Kulkarni
b7d420a29e * feat: Add completion progress bar to dashboard
[SE-4473] Add completion progress bar to dashboard (#29271)
2022-02-09 09:28:48 -05:00
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
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
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
ca1a44f15d Merge branch 'master' into chris/LX-2398 2022-01-17 11:11:59 +10:30
SaadYousaf
2c6989feab fix: correct studio sequence navigation bar with correct Next and Previous button actions 2022-01-12 16:20:05 +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
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
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
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
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
bd5e00b725 fix: fixed RemovedInDjango40 warnings in common 2021-12-14 19:55:01 +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
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
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
Ned Batchelder
d9dd10dc97 style: code cleanups from Steven Burch (#29292)
* chore: update deprecated import from collections

* chore: remove outdated imports from markdown library

as it hasn't been supported since 2.0.3 and we're on 3.x.
This was deprecated at least as early as 2012!

* docs: add docstring and remove lint-amnesty to markdown plugin

* chore: remove deprecated etree import

* style: remove unnecessary-comprehension for sets

* style: resolve a number of amnestied pylint complaints

Co-authored-by: stvn <stvn@mit.edu>
2021-11-10 07:11:57 -08:00
David Ormsbee
2d60224125 Merge pull request #28571 from open-craft/jill/bd-13-render_template
feat!: [BD-13] Deprecate ModuleSystem.render_template
2021-11-09 12:20:59 -05:00
David Ormsbee
0ec2a3b9b5 docs: ADR for removing MongoDB usage. 2021-11-09 10:55:28 -05:00
Jillian Vogel
26b43465a4 refactor: use MakoService.render_template to remove deprecation warnings
from test code.
2021-11-09 14:03:54 +10:30
Jillian Vogel
8d62d337f5 refactor: use MakoService.render_template to remove deprecation warnings
from block code.
2021-11-09 14:03:54 +10:30
Jillian Vogel
457f959356 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.
2021-11-09 14:03:50 +10:30
Braden MacDonald
480e8997ec fix: A test (test_save_one_and_confirm) was flaky 2021-11-08 10:46:33 -08:00
David Ormsbee
15eca3ba59 Merge pull request #29190 from open-craft/jill/BD-13-user-service-fix
[FAL-2457] Let ModuleSystem use UserService
2021-11-08 09:18:10 -05:00
Farhaan Bukhsh
cfe75e95b9 feat: Add discussion_enabled for Unit (#28864)
For each unit discussion_enabled flag is added
so that each unit can be made discussable when needed.

Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
2021-11-08 16:17:07 +05:00