Commit Graph

139 Commits

Author SHA1 Message Date
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
Kyle McCormick
8813a61da2 feat!: remove SemanticSectionDescriptor, the final XModule (#26990)
A "section" tag in an OLX upload used to map to the
SemanticSectionDescriptor, which translated it into a Sequence
("sequential" tag). This is both obscure and confusing, since it uses
language that predates Studio. Back in the LMS prototype days,
"section" was inconsistently used to be interchangeable with "sequence"
and "sequential", and what Studio today calls a "section" was called a
"chapter". Bits of this legacy terminology are still around in the
courseware rendering code.

The upshot is that if you make an OLX tag "section" before this commit,
it would not map to what we call a "Section" in all our documentation,
but to a "Subsection"; furthermore, if that <section> only had one child
element, the node would be replaced with its singular child, removing
the <section> node from the course tree entirely.

The fact that you can make a "section" OLX tag
at all is nowhere in our documentation because courses haven't been
written that way since late 2011 or early 2012.

SemanticSectionDescriptor came up as part of the XModule ->
XBlock conversion efforts as a legacy XModule that isn't worth
converting. With the removal of this class, all XBlocks
in edx-platform are "pure" XBlocks, ending our reliance
on the XModule-to-XBlock shimming infrastructure.

This commit also removes the process_includes decorator, which was only
used for "section" tags. This does NOT delete the ProblemBlock-specific
<include> tag, which is still supported (if obscure).

There is a chance that through tribal knowledge or copy-paste, some
section tags survive in the wild of old edX courses. It's difficult for
us to assess because by its nature, this tag doesn't just say
"section", but instead actually does the mutation on import so it's
stored as "sequential" in the modulestore–therefore things like
CourseGraph can't detect it.
The fix for any such XML-authored courses is:
* For instances of <section> that wrap a single child node,
  replace the <section> node in favor of its child node.
* For instances of <section> that wrap a sequence of children,
  substitute <section> with <sequential>
Note that "<section>" is a valid HTML tag
type and so may show up in any component that can contain HTML and is
unrelated to the course structure OLX tag alias "<section>" that this
commit removes.

DEPR-124
2021-03-15 09:04:23 -04:00
Usman Khalid
23d1e5b654 Remove unused RawDescriptor and EmptyDataRawDescriptor. 2021-03-11 22:20:33 +05:00
Usman Khalid
fb02353719 Convert TranslateCustomTagDescriptor to TranslateCustomTagBlock. 2021-03-11 22:20:33 +05:00
Usman Khalid
556ef4cb39 Created CustomTagTemplateBlock to use with CustomTagBlock instead of RawDescriptor. 2021-03-11 22:20:33 +05:00
Usman Khalid
e624a8f4ac Convert CustomTagModule to CustomTagBlock. 2021-03-09 09:27:43 -05:00
Usman Khalid
48290cf837 Convert PollModule to PollBlock. 2021-03-09 09:27:43 -05:00
Kyle McCormick
9aefd6f986 style: django-not-configured is not a sensible lint-amnesty value (#26862)
django-not-configured is an error raised by pylint (with
the pylint-django plugin) when it's not correctly configured.

We should not be applying lint amnesty for such a violation.
2021-03-05 08:11:58 -05:00
Usman Khalid
dd96a2aa72 Convert Course, Section and Sequence XModules to XBlocks. (#25965) 2021-03-02 10:29:33 -05:00
Usman Khalid
62ed654b31 Convert LTIModule into LTIBlock. (#25713) 2021-02-16 09:09:13 -05:00
usamasadiq
1175838fa5 fix pep8 warnings 2021-02-08 16:08:01 +05:00
usamasadiq
bbc386752f Applied pylint-amnesty 2021-02-04 18:52:10 +05:00
Usman Khalid
9116599f00 Convert HiddenDescriptor to an XBlock.
The class name has been retained because the class path is
specified in the modulestore config in a number of places.
2021-01-14 01:22:08 +05:00
Usman Khalid
9e38b17202 Convert ErrorModule and NonStaffErrorModule to XBlocks. (#25570) 2021-01-07 10:51:33 -05:00
Usman Khalid
75391262da [BD-04] Convert SplitTest XModule to XBlock. (#25696) 2021-01-05 09:55:14 -05:00
Usman Khalid
4a6f2b81a9 Convert Annotatable XModule to XBlock. 2020-11-24 04:58:59 +05:00
David Ormsbee
d83241e503 Merge pull request #24809 from open-craft/symbolist/convert-randomize-module-to-xblock
[BD-04] Convert Randomize XModule to XBlock
2020-11-12 13:06:57 -05:00
Usman Khalid
f62b5de6b1 Convert ConditionalModule to ConditionalBlock. 2020-11-07 20:02:02 +05:00
Usman Khalid
8e4a9d2ba1 Convert RandomizeModule to RandomizeBlock. 2020-11-04 23:15:35 +05:00
Usman Khalid
8546fa6b6f Convert LibraryContentModule to LibraryContentBlock. (#24611) 2020-09-15 08:41:29 -04:00
Sid Verma
99220e0967 Add "Source from library" XBlock
This lets the user import a block from a blockstore-based content library into a (modulestore based) course, by copying the block into the course.
2020-07-24 13:32:37 +05:30
Usman Khalid
4cc0f30db7 Convert WordCloudDescriptor and WordCloudModule into WordCloudBlock. 2020-07-09 09:46:54 +05:00
Silvio Tomatis
99bdb23375 Add xblock.v1 and xmodule.v1 entrypoints for NonStaffErrorDescriptor
If an error occurs while rendering an xmodule, the LMS chokes with the
following error if accessed by a non admin user.

In the admin user case the existing line that registers ErrorDescriptor
ensures that everything works. But for the non admin case we need this
additional directive.

Traceback (most recent call last):
  File "/openedx/edx-platform/lms/djangoapps/courseware/views/index.py", line 153, in get
    return self.render(request)
  File "/openedx/edx-platform/lms/djangoapps/courseware/views/index.py", line 217, in render
    return render_to_response('courseware/courseware.html', self._create_courseware_context(request))
  File "/openedx/edx-platform/lms/djangoapps/courseware/views/index.py", line 468, in _create_courseware_context
    courseware_context['fragment'] = self.section.render(self.view, section_context)
  File "/usr/local/lib/python2.7/site-packages/xblock/core.py", line 202, in render
    return self.runtime.render(self, view, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1914, in render
    return self.__getattr__('render')(block, view_name, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1335, in render
    return super(MetricsMixin, self).render(block, view_name, context=context)
  File "/usr/local/lib/python2.7/site-packages/xblock/runtime.py", line 831, in render
    frag = view_fn(context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/seq_module.py", line 262, in student_view
    return self._student_or_public_view(context, prereq_met, prereq_meta_info, banner_text)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/seq_module.py", line 343, in _student_or_public_view
    items = self._render_student_view_for_items(context, display_items, fragment, view) if prereq_met else []
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/seq_module.py", line 485, in _render_student_view_for_items
    rendered_item = item.render(view, context)
  File "/usr/local/lib/python2.7/site-packages/xblock/core.py", line 202, in render
    return self.runtime.render(self, view, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1914, in render
    return self.__getattr__('render')(block, view_name, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1335, in render
    return super(MetricsMixin, self).render(block, view_name, context=context)
  File "/usr/local/lib/python2.7/site-packages/xblock/runtime.py", line 831, in render
    frag = view_fn(context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/vertical_block.py", line 118, in student_view
    return self._student_or_public_view(context, STUDENT_VIEW)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/vertical_block.py", line 85, in _student_or_public_view
    rendered_child = child.render(view, child_block_context)
  File "/usr/local/lib/python2.7/site-packages/xblock/core.py", line 202, in render
    return self.runtime.render(self, view, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1914, in render
    return self.__getattr__('render')(block, view_name, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1335, in render
    return super(MetricsMixin, self).render(block, view_name, context=context)
  File "/usr/local/lib/python2.7/site-packages/xblock/runtime.py", line 831, in render
    frag = view_fn(context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/library_content_module.py", line 314, in student_view
    rendered_child = displayable.render(STUDENT_VIEW, child_context)
  File "/usr/local/lib/python2.7/site-packages/xblock/core.py", line 202, in render
    return self.runtime.render(self, view, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1914, in render
    return self.__getattr__('render')(block, view_name, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1335, in render
    return super(MetricsMixin, self).render(block, view_name, context=context)
  File "/usr/local/lib/python2.7/site-packages/xblock/runtime.py", line 835, in render
    updated_frag = self.wrap_xblock(block, view_name, frag, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1287, in wrap_xblock
    frag = wrapper(block, view, frag, context)
  File "/openedx/edx-platform/openedx/core/lib/xblock_utils/__init__.py", line 155, in wrap_xblock
    add_webpack_to_fragment(frag, class_name)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/util/xmodule_django.py", line 28, in add_webpack_to_fragment
    for chunk in webpack_loader.utils.get_files(bundle_name, extension, config):
  File "/usr/local/lib/python2.7/site-packages/webpack_loader/utils.py", line 31, in get_files
    return list(_get_bundle(bundle_name, extension, config))
  File "/usr/local/lib/python2.7/site-packages/webpack_loader/utils.py", line 23, in _get_bundle
    bundle = get_loader(config).get_bundle(bundle_name)
  File "/usr/local/lib/python2.7/site-packages/webpack_loader/loader.py", line 83, in get_bundle
    raise WebpackBundleLookupError('Cannot resolve bundle {0}.'.format(bundle_name))
WebpackBundleLookupError: Cannot resolve bundle NonStaffErrorModule.
2020-02-04 16:12:57 +01:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Braden MacDonald
d3f6ed09d8 Learning Contexts, New XBlock Runtime, Blockstore API Client + Content Libraries
https://github.com/edx/edx-platform/pull/20645

This introduces:
* A new XBlock runtime that can read and write XBlocks that are persisted using
  Blockstore instead of Modulestore. The new runtime is currently isolated so
  that it can be tested without risk to the current courseware/runtime.
* Content Libraries v2, which store XBlocks in Blockstore not modulestore
* An API Client for Blockstore
* "Learning Context" plugin API. A learning context is a more abstract concept
  than a course; it's a collection of XBlocks that serves some learning purpose.
2019-08-30 10:31:15 -07:00
David Ormsbee
b3614f3a00 Merge pull request #20954 from open-craft/symbolist/html-block
HtmlModule to HtmlBlock [SE-1089]
2019-08-01 11:36:23 -04:00
Usman Khalid
8dfc8e5fda Convert AboutModule, CourseInfoModule, HtmlModule and StaticTabModule to XBlocks. 2019-07-24 20:19:44 +05:00
Ayub khan
0069d7db33 INCR-419 python3 compatibility 2019-07-16 16:11:02 +05:00
Usman Khalid
0b27c62ca6 Convert VideoModule to VideoBlock.
Some deprecated functionality has been removed:

- Reading data field and transforms being applied in the init() method.
- The source field.
- The source_visible attribute.
2019-06-20 22:12:39 +05:00
Jeremy Bowman
45e390d0ea Upgrade to edx-opaque-keys 1.0.1 (#20817) 2019-06-14 12:15:44 -04:00
Usman Khalid
41c6236e0a Convert CapaModule to ProblemBlock.
* Minimum possible changes were made to merge CapaModule & CapaDescriptor into
  one ProblemBlock class.
* There are no known changes in behavior.
* CapaModule and CapaDescriptor inherited from a number of classes which inherit
  from XModule or XModuleDescriptor but did not depend on them. For all these
  classes the methods were moved to mixins which did not inherit from either and
  then these mixins were added to ProblemBlock in the order which maintains MRO.
2019-05-01 20:08:36 +05:00
Jeremy Bowman
713d64e1e2 TE-2702 Update Read the Docs links to HTTPS 2018-08-15 17:34:01 -04:00
lduarte1991
a9b61c06d3 Remove the annotations feature introduced by Harvard.
There are other annotations features still in the platform but this one
is the one that works with an annotations server that was specialized
and not generally used by most instances of the platform.

The initial PR to remove this was made by 'lduarte1991' and can be found
here: https://github.com/edx/edx-platform/pull/17299

The work done based on the squashed commits:
removed advanced modules config for annotations
remove module files and config for annotations
remove js and css files related to annotations, under ova folders
removed js and css annotator file configs for cms and lms
remove template html files for annotations
removed annotations options from static html book
Added back some files that were originally marked "for OVA" but others used as per acceptance tests
Added back css file configs incorrectly marked as ova
Remove annotation related advanced settings from test.
Correct hls require.js pathing.
2018-07-16 16:55:08 -04:00
George Schneeloch
6aa87d43c0 Fix broken link in comment 2018-02-14 14:48:07 -05:00
David Ormsbee
b87ab764df Separate SectionDescriptor and add highlights field. 2017-10-18 15:54:33 -04:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Calen Pennington
fd0d69594a Upgrade to the latest version of opaque-keys 2016-12-01 13:04:31 -05:00
John Eskew
9e07bb530c Bump edx-opaque-keys version to 0.3.4 2016-09-13 14:54:32 -04:00
E. Kolpakov
33b3dfcc92 Converts Discussion XModule to Discussion XBlock
* Renames discussion_module to discussion_xblock
* Moves common/lib/xmodule/xmodule_discussion to openedx/core/lib/xblock_builtin/xblock_discussion
2016-06-29 06:47:04 +12:00
cahrens
ba06c899de Delete crowdsource_hinter prototype xmodule.
TNL-4195
2016-03-04 15:34:48 -05:00
Calen Pennington
1d60c40bd2 Merge pull request #11215 from CredoReference/xblock_aside_example
XBlockAsides: little example of usage
2016-02-02 10:45:20 -05:00
Clinton Blackburn
29f0a5b172 Updated XModule opaque-keys dependency
Using edx-opaque-keys instead of opaque-keys
2016-01-27 17:19:39 -05:00
Dmitry Viskov
efb86f2169 XBlockAsides Hello world example 2016-01-14 03:19:23 +03:00
Sarina Canelake
2bc7b954ab Remove the graphical slider tool 2015-12-17 13:24:00 -05:00
Sarina Canelake
5386d0a4ca Merge pull request #10845 from edx/kill-ora1
Remove ORA1: Main Pull Request
2015-12-11 17:31:41 -05:00
Sarina Canelake
f689271639 Remove combined_open_ended XModule Python code (ORA1) 2015-12-11 15:07:10 -05:00
Sarina Canelake
46bbd0a668 Remove outdated abtest_module 2015-12-11 14:54:45 -05:00
Sarina Canelake
84a96e40c4 Remove 'Fold It' XModule 2015-12-06 11:38:05 -05:00
David Baumgold
ebe8b25210 Upgrade setuptools to 18.0.1
This reverts commit 1a3f0958b9.
2015-07-30 16:22:42 -04:00
David Baumgold
1a3f0958b9 Revert setuptools upgrade 2015-07-15 09:36:56 -04:00