Commit Graph

68 Commits

Author SHA1 Message Date
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
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
Dmitry Viskov
bb09fdb7be Ability to hide Pages from students 2016-10-14 22:43:26 +03:00
Toby Lawrence
bb29ad5f30 Revert "Revert "[PERF-325] Add versioned course asset URLs when canonicalizing asset paths.""
This reverts commit 9967b6fd58.
2016-06-23 13:27:15 -04:00
Kevin Falcone
9967b6fd58 Revert "[PERF-325] Add versioned course asset URLs when canonicalizing asset paths."
We're seeing errors in NR from objects read out of the cache lacking the
'StaticContent' object has no attribute 'content_digest'
File "/edx/app/edxapp/edx-platform/common/djangoapps/contentserver/middleware.py",
    line 70, in process_request

This reverts commit 849ebc5f22.
2016-06-22 12:11:35 -04:00
Toby Lawrence
849ebc5f22 [PERF-325] Add versioned course asset URLs when canonicalizing asset paths. 2016-06-15 08:04:52 -04:00
Toby Lawrence
0009d53c53 Adding optimized images in batches [15/19] 2016-01-13 20:38:42 -05:00
Toby Lawrence
451b0a9c66 Revert "Crush down images."
This reverts commit 8402be3b20.
2016-01-13 19:12:13 -05:00
Toby Lawrence
8402be3b20 Crush down images.
Ran these suckers through ImageOptim, which crunched 'em down real nice.
2016-01-13 18:29:00 -05:00
Calen Pennington
8cba4702ce Shrink images using trimage
.../js/vendor/ova/images/previous_pressed.png      | Bin 755 -> 665 bytes
 .../static/js/vendor/ova/images/previous_rest.png  | Bin 661 -> 572 bytes
 .../js/vendor/ova/images/zoomin_grouphover.png     | Bin 612 -> 496 bytes
 .../static/js/vendor/ova/images/zoomin_hover.png   | Bin 608 -> 506 bytes
 .../static/js/vendor/ova/images/zoomin_pressed.png | Bin 615 -> 515 bytes
 common/static/js/vendor/ova/images/zoomin_rest.png | Bin 612 -> 496 bytes
 .../js/vendor/ova/images/zoomout_grouphover.png    | Bin 504 -> 397 bytes
 .../static/js/vendor/ova/images/zoomout_hover.png  | Bin 559 -> 461 bytes
 .../js/vendor/ova/images/zoomout_pressed.png       | Bin 561 -> 458 bytes
 .../static/js/vendor/ova/images/zoomout_rest.png   | Bin 504 -> 397 bytes
 common/test/data/aside/static/just_a_test.jpg      | Bin 547 -> 517 bytes
 common/test/data/badges/good.png                   | Bin 298 -> 91 bytes
 common/test/data/badges/large.png                  | Bin 431556 -> 429842 bytes
 common/test/data/badges/unbalanced.png             | Bin 232 -> 86 bytes
 .../static/images/course_image.jpg                 | Bin 12626 -> 12617 bytes
 .../static/images/professor-sandel.jpg             | Bin 453715 -> 447109 bytes
 .../Screen Shot 2013-04-16 at 1.43.36 PM.png       | Bin 8733 -> 1525 bytes
 .../data/simple/static/images_course_image.jpg     | Bin 547 -> 517 bytes
 common/test/data/static/picture1.jpg               | Bin 10905 -> 6857 bytes
 common/test/data/static/picture2.jpg               | Bin 13598 -> 9739 bytes
 common/test/data/static/picture3.jpg               | Bin 14977 -> 9946 bytes
 common/test/data/toy/static/just_a_test.jpg        | Bin 547 -> 517 bytes
 common/test/data/uploads/Signature-0.png           | Bin 31182 -> 14473 bytes
 common/test/data/uploads/Signature-1.png           | Bin 31182 -> 14473 bytes
 common/test/data/uploads/larger_image.jpg          | Bin 1070335 -> 1053927 bytes
 25 files changed, 0 insertions(+), 0 deletions(-)
2016-01-07 10:48:40 -05:00
Sarina Canelake
2e4bba0a79 Remove ORA1 test units from xmodule test courses 2015-12-11 15:07:12 -05:00
Sarina Canelake
ade863e994 Remove CMS Course Checklists feature 2015-12-11 10:32:14 -05:00
David Baumgold
2159d34128 Added a simple XBlockMixin for courseware licenses
This allows course authors to choose between two difference licenses for their
course content: All Rights Reserved, or Creative Commons. In the backend, XBlocks
that wish to allow custom licenses need only inherit from LicenseMixin, which
adds a `license` field as a string.

License information is displayed in the Studio editor view, and just below the
rendered XBlock in the LMS. In addition, if the course block itself has a custom
license set, this license will display just below the main body of the page
on courseware pages.

This entire feature is gated behind the LICENSING feature flag.
2015-05-18 14:34:28 -04:00
Don Mitchell
de5e88561f Make XmlModuleStore handle asides
PLAT-221
2014-12-17 13:51:10 -05:00
Carson Gee
c4ea338035 Additional logic to handle more course_image URL edge cases
This changes logic to allow more missed use cases of course_image to
work properly.  The cases are:

. XML courses with the course_image attribute set
. Mongo courses that are imported without a contentstore
. Mongo courses that have course_image set but don't have a content store

It also exports default images_static_course.jpg to
images/static_course.jpg to handle a use case where a course author
uploaded an image to the default location in studio without using the
studio interface for adding course images, they then export the course, and then
import it without a contentstore
2014-04-24 16:54:40 -04:00
Usman Khalid
ae73f3eaa0 Puts module.render() in try statements.
LMS-1192
2014-03-19 19:30:22 +05:00
zubiar-arbi
b998a161d2 Assign valid content_type to static resource (import_static_content)
STUD-878
2014-01-06 14:05:09 +05:00
cahrens
dc3b5ab57a Support unicode in text field.
Part of STUD-868
2013-12-20 13:31:16 -05:00
Julian Arni
b4e6a8b209 Fix order-dependency in tests 2013-09-23 10:52:05 -04:00
Chris Dodge
5886118afe in XML deserializations, we can get get floats for start/stop times, so we need to be able to parse those
add test video with float-based end-time
2013-09-17 10:38:21 -04:00
cahrens
cda45cd77a Add a checklist example to test course for import/export roundtrip. 2013-09-12 09:58:07 -04:00
chrisndodge
2699ba65ba Merge pull request #756 from edx/fix/cdodge/incorrect-html-serialization
Fix/cdodge/incorrect html serialization
2013-08-22 08:58:56 -07:00
Chris Dodge
d523167bdd add another piece of test data. just an img tag. 2013-08-20 23:16:39 -04:00
Chris Dodge
cf7b744fec add test files 2013-08-20 22:47:22 -04:00
Chris Dodge
5a7bcd7bb3 always serialize out HTML content to a separate .html file 2013-08-20 22:43:53 -04:00
Chris Dodge
5989bf6bdc update the PDF textbook url paths as well as update wiki_slug when importing 2013-08-20 21:50:28 -04:00
Chris Dodge
033f922ec0 add a try catch around the staticstorage lookup, which can throw an exception 2013-08-17 10:33:59 -04:00
Peter Fogg
e20acee4c4 Working on Videoalpha test fix.
Fixed all common and LMS tests.

The tests were failing because XMLDescriptor adds in some attributes
to _model_data, such as `xml_attributes`, that aren't necessary. The
solution is to handle all XML parsing in VideoDescriptor. There's
still one test failing in CMS, which has to do with metadata being
saved. I'm still working out how to update it in such a way that it
doesn't fail, but still tests something meaningful.
2013-08-12 14:32:15 +03:00
Chris Dodge
1c2958e35d address PR feedback 2013-08-09 20:46:14 -04:00
Chris Dodge
607573fbd9 add test files 2013-08-09 20:46:13 -04:00
Chris Dodge
e2358af6a9 add ability to rewrite links on the old /courses/<org>/<course>/<run>/jump_to/i4x://<org>/<course> .. intracourseware linking to the new portable /jump_to_id/<id> format 2013-08-09 20:46:13 -04:00
Chris Dodge
36fda35040 do portable link rewriting on import and add test to confirm it 2013-08-09 20:46:12 -04:00
Chris Dodge
3dbe4c189f add unit tests around asserting that /static/ links are not re-written on import 2013-08-05 16:15:03 -04:00
Chris Dodge
ebbeeb16a2 add some unit tests for the new fields 2013-08-02 09:56:19 -04:00
Chris Dodge
6f3b49a6f9 add some chinese characters to the test content 2013-07-23 12:15:56 -04:00
Chris Dodge
e24eb3e4eb added explicit unit test to verify the link rewriting 2013-07-23 12:15:55 -04:00
Chris Dodge
80e0b99342 add a reference in the toy course to the test jump_to_id HTML module 2013-07-23 12:11:41 -04:00
Chris Dodge
1c79b9c874 add a /jump_to_id/ shortcut for producing more durable links between courseware in Studio 2013-07-23 12:10:49 -04:00
Chris Dodge
22802a4d29 change from_xml class method on video class to make sure we honor the fact that the xml string could actually be a pointer to another file on disk which actually contains the attributes 2013-07-19 13:54:22 -04:00
Chris Dodge
99ff3719cc remove the video from the toy course for now as the import-export-import isn't totally equivalence. 2013-07-18 10:35:50 -04:00
Chris Dodge
8325e28a10 add a default XML serialization if the 'data' field is empty or None. Some XModules now - like video XModule - do not have XML set in the 'data' field 2013-07-17 12:31:33 -04:00
Chris Dodge
ab4012cc59 fix up some of the test courses which had hardcoded that quot; escaping 2013-07-12 11:33:46 -04:00
JonahStanley
5d300bf36f Fixed the broken unit tests from deleting full 2013-07-11 14:34:41 -04:00
JonahStanley
4e015eacf5 Fixed the whitelist test to not use full course 2013-07-11 12:05:18 -04:00
JonahStanley
67326cfae8 Fixed xmodule tests to not rely on full
Also fixed things in the toy course where needed
2013-07-11 10:12:09 -04:00
JonahStanley
982777f547 All cms unit test no longer rely on the full course.
Factories were used when possible but tests depending on importing or things not manageable by factories used the toy course.  New files were added to include the needed functionality.  Most files are blank or have minimal xml needed to work
2013-07-11 10:09:05 -04:00
JonahStanley
55e6d1ad67 Asset tests do not rely on the full course
A blank asset file was also added to toy
2013-07-11 10:08:47 -04:00
JonahStanley
62f2764728 First half of refactorization.
This fixes the following tests(T stands for toy, F stands for factory made):
T import_textbook_as_content_element (needed to add a textbook to toy)
F static_tab_reordering
T import polls (needed to add a poll to toy)
T xlint_fails
F delete
T about_overrides (needed to add an about override to toy)
F remove_hide_progress_tab
2013-07-11 10:08:40 -04:00
Peter Fogg
8159e86141 Many changes to finish up PR. To wit:
-- Changed docstrings to use double quote.
-- More consistent naming for youtube IDs (normal_speed_id -> youtube_id_1_0).
-- Formatting changes for readability.
-- Updated test XML to expect JSON-encoded strings; prevents tests from spuriously failing.
2013-06-17 13:46:20 -04:00
Peter Fogg
5cee351896 Update XML in old video tests. This change tags like <video youtube="1.0:abcdefg"> to <video youtube_id_1_0="abcdefg". 2013-06-13 11:51:04 -04:00