Commit Graph

83 Commits

Author SHA1 Message Date
Piotr Surowiec
5b5a0e4c06 Merge pull request #30072 from open-craft/agrendalath/bd-13-simplify_xmodule_serialization
reafactor: simplify XModule serialization/deserialization layer [BD-13]
2022-12-07 18:01:57 +01:00
Maria Grimaldi
20b93b8b01 fix: upgrade problem templates according newer python versions (#31365) 2022-12-06 11:30:06 -04:00
Saad Ali
d0fad59306 chore: Overhaul Dockerfile for sandboxes (#31232)
* chore: Overhaul Dockerfile for sandboxes using Docker best practices
* Reduce image size by installing and removing prerequisite packages
in the same layer.
* Rearrange stages to use docker-production settings for non-dev
  targets. docker-production settings already inherit production
  settings and can be used to override configuration specific to
  containers e.g. logging.

* chore: write improved Dockerfile2 just for testing

* chore: update development stage to not run as app user

* fix: wrap settings configuration in if statement

* chore: update Dockerfile.
* Moved code COPY command down in the base stage.
* Added comments.

Co-authored-by: Alie Langston <alangsto@wellesley.edu>
2022-12-06 08:42:13 -05:00
Agrendalath
c214e697ff refactor: simplify url_name lookup
This removes a `slug` check, as we had already removed its translation in
702866b225.
2022-12-05 13:57:41 +01:00
Agrendalath
3380f88ab3 refactor: delete class XmlDescriptor
It also adds `@XBlock.needs("i18n")` to `XModuleMixin` because this service is
required there.
2022-12-05 13:57:41 +01:00
Agrendalath
8127d19115 refactor: replace XmlMixin with XmlParserMixin
Most of the methods in `XmlMixin` act as wrappers for the official API for
serialization and deserialization (parse_xml() and add_xml_to_node()).
`XmlParserMixin` contains the code which does the actual serialization and
deserialization.
2022-12-05 13:57:41 +01:00
Agrendalath
499f09e2fb refactor: convert from_xml to parse_xml for TranslateCustomTagBlock 2022-12-05 13:57:41 +01:00
Agrendalath
20f6650f53 refactor: convert from_xml to parse_xml for VideoBlock 2022-12-05 13:57:41 +01:00
Agrendalath
1bfd3842c7 refactor: convert from_xml to parse_xml in CourseBlock 2022-12-05 13:57:41 +01:00
Agrendalath
da2e89db83 refactor: move resources_dir from XmlMixin to XmlParserMixin 2022-12-05 13:57:41 +01:00
Jansen Kantor
db082830e3 fix: slight change to logic of how teams is considered enabled (#31277)
* fix: slight change to logic of how teams is considered enabled

* fixup! fix: slight change to logic of how teams is considered enabled
2022-11-29 14:01:55 -05:00
Arunmozhi
54507c1e08 feat: allow overriding TinyMCE config using settings
The TinyMCE configuration can be overridden by adding a
`TINYMCE_CONFIG_OVERRIDES` dict to the `JS_ENV_EXTRA_CONFIG`.
2022-11-23 19:55:28 +01:00
0x29a
d6c6a44ed5 refactor: remove prefer_xmodules
This function is no longer needed as all XModules have been converted to XBlocks.

XBLOCK_SELECT_FUNCTION Django setting is removed too, as it could take only `prefer_xmodules` or `default_select` values.
2022-11-16 13:08:22 +01:00
Piotr Surowiec
f419d6b194 feat: deprecate track_function and publish in ModuleSystem [BD-13] (#30046)
* feat: delete `track_function` from ModuleSystem

* feat: delete `publish` argument from ModuleSystem
2022-11-15 10:46:24 -05:00
Asad Ali
cb4279dd9e fix: retrieve raw content from TinyMCE editor (#31212)
During the upgrade to TinyMCE v5, we changed the content format to `text`.
However, it ignores changes in HTML tags. This reverts the format to `raw`.
2022-11-07 17:44:54 +01:00
Piotr Surowiec
fd2e95f531 Merge pull request #31173 from open-craft/maxim/remove-unused-xmodule-classes
[BD-13] refactor: Remove unused XModule classes
2022-11-07 17:42:39 +01:00
Sagirov Eugeniy
8f88422c4a test: prepare tests for removing support for children in Old Mongo 2022-10-28 11:43:20 -04:00
Maxim Beder
3e9437cc4a refactor: remove unused TabsEditingMixin 2022-10-28 15:37:56 +02:00
Maxim Beder
bbfa975e80 refactor: remove unused assetstore exceptions 2022-10-28 11:23:16 +02:00
Maxim Beder
205a7b25cf refactor: remove unused TimeInfo 2022-10-28 11:23:16 +02:00
Maxim Beder
8336c7f9b5 refactor: remove unused StudioEditableModule 2022-10-28 11:23:16 +02:00
Maxim Beder
98d9e622b4 refactor: remove unused MakoModuleDescriptor 2022-10-28 11:23:16 +02:00
Maxim Beder
995713c6c6 refactor: remove unused TabsEditingDescriptor 2022-10-28 11:23:16 +02:00
Maxim Beder
3020f4af53 refactor: remove unused attributes and methods of TabsEditingMixin 2022-10-28 11:23:16 +02:00
Maxim Beder
5a3ba5d8c4 refactor: remove unused EditingDescriptor 2022-10-28 11:23:12 +02:00
Maxim Beder
a1bb30a792 refactor: remove unused JSONEditingDescriptor
Removing js file related to it as well, since it's not being used
anywhere, unlike with other removed descriptors.
2022-10-28 11:23:12 +02:00
Maxim Beder
6017d0c28b refactor: remove unused MetadataOnlyEditingDescriptor 2022-10-28 11:23:12 +02:00
Maxim Beder
fd61f1fff6 refactor: remove unused XMLEditingDescriptor 2022-10-28 11:23:12 +02:00
Maxim Beder
0d98521943 refactor: remove unused dummy_track function 2022-10-28 11:23:11 +02:00
Usama Sadiq
4734f9f16e fix: bump pylint version (#31084) 2022-10-27 12:19:09 +05:00
Navin Karkera
a959c5d35f fix: preview mode navigation previous button (that uses legacy UI)
Legacy UI: Previous button should use prev_url if it in first
position. In studio UI, it should always use prev_url. To make this
possible we checking length of contents which is always zero for studio
and more than 0 for legacy UI.
2022-10-25 17:23:10 +02:00
Sagirov Eugeniy
3f3d0d25d8 feat!: Remove inheritance-related code from Old Mongo 2022-10-24 11:58:44 -04:00
Piotr Surowiec
39d9c2f748 Merge pull request #31159 from open-craft/maxim/clean-up-htmlsnippets
[BD-13] refactor: Clean up HTMLSnippet
2022-10-20 16:01:14 +02:00
Matt Hughes
b8fee69340 fix: remove noisy log 2022-10-18 15:28:50 -04:00
Maxim Beder
0919fc7dab refactor: add js_module_name attribute to MakoTemplateBlockBase
In the previous commit `js_module_name = None` was removed from
HTMLSnippet class, because it's not being used by this class, or the
classes that inherit from it. But `js_module_name` is used in
MakoTemplateBlockBase.

Not all classes that inherit from MakoTemplateBlockBase define this
attribute, since the same classes inherit from HTMLSnippet class, which
used to provide a fallback for this attribute. To prevent
`AttributeError`, defining the default value of `None` in
MakoTemplateBlockBase.
2022-10-17 19:25:50 +02:00
Maxim Beder
e0330cf418 refactor: clean up HTMLSnippet
Remove code that is no longer needed after conversion of all the
XModules to standard XBlocks.
2022-10-15 14:27:58 +02:00
Kristin Aoki
cb51735333 feat: add thumbnail field to video xblock fields 2022-10-12 15:40:39 -04:00
Muhammad Adeel Tajamul
e96102b2f1 feat: removed discussion sort options from advanced settings (#30963)
Co-authored-by: adeel.tajamul <adeel.tajamul@arbisoft.com>
2022-09-30 11:42:59 +05:00
Piotr Surowiec
fcb594d635 Merge pull request #30715 from open-craft/agrendalath/bd-13-deprecate_course_id
refactor: deprecate course_id from ModuleSystem [BD-13]
2022-09-26 14:23:11 +02:00
UsamaSadiq
897cb3617f refactor!: delete common/lib and related usages 2022-09-22 14:16:34 +05:00
Agrendalath
1afb32c775 fix: move service initialization from LMS runtime init to module render 2022-09-21 19:05:03 +02:00
Agrendalath
dd97c74fde refactor: deprecate course_id from ModuleSystem
This attribute is already deprecated for XBlocks in favour of directly
retrieving it like `block.scope_ids.usage_id.context_key`.

This commit also removes some redundant logging code which was omitted in the
Datadog removal in #19420.
2022-09-21 18:53:45 +02:00
Agrendalath
99042f6282 refactor: remove deprecated runtime.course_id from Timed Exams
We will use `context_key` instead.
2022-09-21 18:52:28 +02:00
Agrendalath
98bb30dcd8 refactor: remove deprecated runtime.course_id from VideoBlock
We will use `context_key` instead.
2022-09-21 18:52:27 +02:00
Agrendalath
086e6515ac refactor: use SandboxService while generating CAPA responses report 2022-09-21 18:52:27 +02:00
Agrendalath
668683559b refactor: deprecate static_url argument from ModuleSystem
This argument was officially used only by the ProblemBlock.
If you need to get the base URL for static assets in your XBlock, please use
`settings.STATIC_URL` directly, instead of `runtime.STATIC_URL`.
2022-09-21 18:28:44 +02:00
Sagirov Evgeniy
42246c858d feat!: remove code related to Old -> Split migration (#30955)
This commit removes code that was used to copy Old Mongo courses into
new Split Mongo courses. This includes both the migrate_to_split
management command, as well as the backend code that would be invoked
to re-run Old Mongo courses as Split courses using Studio (the UI for
this was already removed in b429e55c).

This is a part of the Old Mongo removal effort tracked in:
  https://github.com/openedx/public-engineering/issues/62
2022-09-19 10:51:40 -04:00
Sandeep Dubey
51b5e624b3 feat: upgrade TinyMCE v4.0.20 to TinyMCE v5.5.1 (#30335)
Co-authored-by: Arunmozhi <arunmozhi@opencraft.com>
2022-09-19 12:43:19 +02:00
Piotr Surowiec
baeb64d13e Merge pull request #30811 from open-craft/0x29a/bb6442/remove_field_data
refactor: remove `field_data` usage by all `DescriptorSystem` subclasses [BD-13]
2022-09-19 12:35:57 +02:00
Sarina Canelake
4a2f231302 fix: fix github url strings (org edx -> openedx) 2022-09-15 14:52:28 -04:00