Commit Graph

3087 Commits

Author SHA1 Message Date
Sagirov Eugeniy
92ca176fde refactor: Remove legacy course info page & related code 2022-06-05 19:00:05 +03:00
Kyle McCormick
25df9ca420 refactor: make safe_lxml an ordinary folder in openedx/core/lib (#25689) 2022-05-24 15:35:23 +05:00
Kaustav Banerjee
702866b225 feat: delete XModuleDescriptorToXBlockMixin (#29927)
This:
1. Deletes XModuleDescriptorToXBlockMixin
2. Deletes `metadata_traslations` and `_translate()` from `XmlParserMixin`,
    and all related implementations.
3. Removes translations of deprecated OLX attributes during import/export:
    <old_attr> : <new_attr>
    - 'slug' : 'url_name'
    - 'name' : 'display_name'
    - 'id' : 'discussion_id' (Discussion XBlock)
    - 'for' : 'discussion_target' (Discussion XBlock)
    - 'attempts' : 'max_attempts' (CAPA)
2022-04-21 16:15:00 +01:00
Jillian Vogel
732d8cb337 fix: use mako prefix lms. when XBlock runtime renders in Studio/authoring MFE
When the XBlock runtime is used in Studio/authoring mode, it needs to
use the template path prefix "lms." in order to locate the block
templates. (In LMS view, no prefix is required.)

Fixes bug introduced by https://github.com/openedx/edx-platform/pull/29354
and removes template workaround added by
https://github.com/openedx/edx-platform/pull/29517 (see Author Notes & Concerns)
2022-04-21 09:39:59 +01: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
Aarif
aa31f3b255 refactor: remove a11y tests setup (#29813) 2022-02-15 18:56:34 +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
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
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
Jawayria
9974ed1856 chore: Applied lint-amnesty on common/tests 2021-12-13 20:56:42 +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
Justin Lapierre
f6f3a79a15 Revert "[BD-13] Deprecate ModuleSystem.render_template" 2021-11-16 15:16: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
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
Matthew Piatetsky
4583b639e6 fix: change svg to png and other email fixes (#29145) 2021-10-29 15:12:36 -04:00
Kyle McCormick
9bf266f717 fix: add missing __init__.py files 2021-10-21 09:54:22 -04:00
Usama Sadiq
023f4144ab fix: fix new pylint warnings (#28725) 2021-09-23 17:54:15 +05:00
DawoudSheraz
e986d360c9 refactor: move course location util to common djangoapp instead of xmodule 2021-09-03 12:40:28 +05:00
Azan Bin Zahid
1cce2e952d feat: add pact verification method 2021-08-24 14:59:46 +05:00
edX cache uploader bot
f7d41c4afc Updating Bokchoy testing database cache (#28493) 2021-08-20 20:50:56 +05:00
edX cache uploader bot
cf53db8f29 Updating Bokchoy testing database cache (#28398) 2021-08-05 10:10:05 +05:00
edX cache uploader bot
414d020380 Updating Bokchoy testing database cache (#28328) 2021-08-02 09:15:10 -04:00
edX cache uploader bot
0dc34f8862 Updating Bokchoy testing database cache (#28283) 2021-07-28 15:09:12 +05:00
edX cache uploader bot
665b32e477 Updating Bokchoy testing database cache (#28262) 2021-07-24 14:56:12 +05:00
Bianca Severino
025eae4b98 chore: install edx-name-affirmation 2021-07-20 14:34:28 -04:00
edX cache uploader bot
33eee4ee3e Updating Bokchoy testing database cache (#28226) 2021-07-20 11:02:49 +05:00
edX cache uploader bot
235f8244f8 Updating Bokchoy testing database cache (#28173) 2021-07-14 11:40:30 +05:00
edX cache uploader bot
b04082dd40 Updating Bokchoy testing database cache (#28160) 2021-07-13 12:30:01 +05:00
edX cache uploader bot
fb7ff7798a Updating Bokchoy testing database cache (#28154) 2021-07-12 22:21:26 +05:00
edX cache uploader bot
8e11603bb6 Updating Bokchoy testing database cache (#28106) 2021-07-07 20:36:25 +05:00
edX cache uploader bot
27d57d1b7e Updating Bokchoy testing database cache (#28099) 2021-07-07 11:45:36 +05:00
edX cache uploader bot
36319bda48 Updating Bokchoy testing database cache (#28087) 2021-07-03 08:40:54 +05:00
edX cache uploader bot
e2319b972b Updating Bokchoy testing database cache (#28079) 2021-07-02 04:59:05 +05:00
Michael Terry
c62626227a fix: jump_to should redirect to first unit on invalid key
Previously, it would 404. While accurate, it's not a great user
experience. Users can be offered invalid jump_to paths in the normal
course of things, if course content disappears or they lose access
to it.

In both cases, they might be offered a resume URL in the courseware
that would be to a now-invalid location.

With this change, that invalid link will at least give them
*something* (the first unit in the course) rather than an error
page.

This also (unrelatedly) fixes an exception when the learning MFE
outline page tries to render a course that contains sequences
with no children.

AA-867
2021-06-28 15:43:12 -04:00
edX cache uploader bot
e0a04c6b48 Updating Bokchoy testing database cache (#28027) 2021-06-24 22:32:15 +05:00
edX cache uploader bot
94b97c1f8f Updating Bokchoy testing database cache (#28010) 2021-06-24 12:18:48 +05:00
sofiayoon
3616910841 Merge pull request #27899 from edx/syoon/AA-797
feat: AA-797 switch course home flag to opt out
2021-06-21 09:37:48 -04:00
edX cache uploader bot
2d79aabacb Updating Bokchoy testing database cache (#27971) 2021-06-17 10:24:59 +05:00
Sofia Yoon
e645d11bba feat: AA-797 switch course home flag to opt out by replacing it with a course home use legacy frontend flag 2021-06-16 10:04:49 -04:00
edX cache uploader bot
38ce1e6bd2 Updating Bokchoy testing database cache (#27962) 2021-06-16 12:06:43 +05:00
edX cache uploader bot
fd937661e0 Updating Bokchoy testing database cache (#27949) 2021-06-14 23:38:28 +05:00
edX cache uploader bot
73fa7bd3b1 Updating Bokchoy testing database cache (#27938) 2021-06-14 13:07:38 +05:00
Julia Eskew
14ec30e018 feat: Make the new courseware MFE the default courseware experience.
- Remove the REDIRECT_TO_COURSEWARE_MICROFRONTEND waffle flag.
- Add a new COURSEWARE_USE_LEGACY_FRONTEND waffle flag that directs
all learners to the legacy courseware experience.
- Skip two failing a11y tests which fail due to the new default of
the courseware MFE.

TNL-8279
2021-06-10 12:21:24 -04:00
edX cache uploader bot
15422b0b20 Updating Bokchoy testing database cache (#27903) 2021-06-10 13:16:04 +05:00
edX cache uploader bot
020c3707b1 Updating Bokchoy testing database cache (#27846) 2021-06-04 23:52:54 +05:00
edX cache uploader bot
114fbeabdf Updating Bokchoy testing database cache (#27823) 2021-06-03 19:58:37 +05:00
edX cache uploader bot
7a6ac8642d Updating Bokchoy testing database cache (#27769) 2021-05-28 20:39:49 +05:00
edX cache uploader bot
b0c74b4272 Updating Bokchoy testing database cache (#27685) 2021-05-20 13:52:32 +05:00
edX cache uploader bot
e1d4dc7d62 Updating Bokchoy testing database cache (#27666) 2021-05-20 00:38:02 +05:00
edX cache uploader bot
6cc3515fa0 Updating Bokchoy testing database cache (#27663) 2021-05-18 14:10:56 +05:00