Commit Graph

55 Commits

Author SHA1 Message Date
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
Peter Fogg
f9b825fe8b Fix failing acceptance tests and allow videos to be imported from XML. 2013-06-11 09:27:02 -04:00
Vik Paruchuri
34dc6e6320 Fix some issues with peer grading service 2013-02-05 13:37:55 -05:00
Chris Dodge
e70db062b2 Merge branch 'feature/cale/cms-master' into feature/cale/cms-master-merge
Conflicts:
	requirements.txt
2013-01-03 10:46:24 -05:00
Brian Wilson
0c1ebd8dfb add toylab test data and test changes, including fix to jump_to 2012-11-30 19:05:26 -05:00
Brian Wilson
9bfa800208 add non-ascii data to toy dataset 2012-11-28 18:28:40 -05:00
Don Mitchell
a9233dfd44 Merge branch 'course-info' into feature/dhm/cms-settings
Conflicts:
	cms/djangoapps/contentstore/views.py
2012-11-19 16:00:27 -05:00
Victor Shnayder
739dd8e3f9 fix for multiple url_name hashing bug 2012-09-06 10:12:48 -04:00
Victor Shnayder
79109a6244 Apply attr_map translation to metadata loaded from policy file as well as from xml. 2012-09-03 13:51:20 -04:00
Victor Shnayder
f81f94ec67 Allow location url_names to contain ':', mapping to / on file load
* New format: {tag}://{org}/{course}/{category}/{name}[@{revision}]
* Updated tests, code
* Added test chapter with : in url_name in toy course
* added test html page with : in url_name
* added a note to docs
2012-08-27 11:37:22 -04:00
Victor Shnayder
1dc31ceb8b fix toylab html 2012-08-21 16:09:35 -04:00
Victor Shnayder
00d9ecd600 New policy organization:
* course roots live in roots/{url_name}.xml
   - one is linked from course.xml

* policies live in policies/url_name.json
  - loaded based on course url_name

* Updated to pass policy through into xml parsing, so it takes effect
  before descriptor constructors are called.

* Update toy test course to new structure, fix up tests
2012-08-16 11:41:19 -04:00
Victor Shnayder
168f76ce5a Add jump_to functionality to lms on mongo
* More tests for mongo modulestore, including tweaks to test files
* add location_to_id method to CourseDescriptors
* Implement path_to_location method in mongo.py
  - TODO: does not handle position in sequences yet.
* fix bug in jump_to view.
2012-07-27 16:08:24 -04:00
Victor Shnayder
eb5989aa99 Ready to implement path_to_location
* Clean up test data for simple, toy courses
* clean up test_mongo.py
* write initial test for path_to_location
* hook up view to use path_to_location

Next: actually implement it :)
2012-07-27 16:08:24 -04:00