Victor Shnayder
0b67d1c401
Turn error_handlers into error_trackers
...
* simplify logic--tracker just tracks errors. Trackers should not raise,
and are not be responsible for logging.
* adapted code to use trackers.
* Started cleanup of error handling code:
- if need to add info and re-raise, just do that. No logging.
- if working around a problem, log and track as needed.
2012-08-01 11:48:18 -04:00
Victor Shnayder
009bd23066
save LazyLoadingDict in case we do want it later
2012-08-01 11:48:18 -04:00
Victor Shnayder
0ae434cc09
Move path_to_location out of mongo.py
...
* also bugfix for load_definition in html_module
* a bit of refactoring of Location checking code in mongo.py
2012-08-01 11:40:12 -04:00
Victor Shnayder
ed35cefa29
Fix html file handling.
...
* html files are now stored as follows:
If the html file is valid xml, store as html/stuff.xml
If it's not, store as html/stuff.xml, which contains
<html meta1="..." filename="stuff.html">,
and html/stuff.html, which actually contains the contents.
Warn if the contents are not parseable with lxml's html parser,
but don't error.
* for parseable html, strip out the html tag when storing, so that it isn't
rendered into the middle of a page
* lots of backcompat to deal with paths. Can go away soon.
* fix output ordering in clean_xml
2012-08-01 11:40:12 -04:00
Victor Shnayder
53608922ba
Make the malformed descriptor import properly
...
* Also get rid of lazy loading of metadata and definition
2012-08-01 11:40:11 -04:00
Calen Pennington
66d5c8effd
Add more detail to error messages during loading from xml
2012-07-30 13:50:50 -04:00
Calen Pennington
6997fc579e
Continue on errors when syncing with github
2012-07-30 13:50:00 -04:00
Victor Shnayder
1251686359
xml format cleanups
...
* rename slug->url_name
* rename name->display_name
* docstring cleanups
* comments :)
2012-07-27 16:09:25 -04:00
Victor Shnayder
da29d88d04
Add import-export round-trip check.
...
* add fix for the file export code--remove tag tail and text,
not just the children.
2012-07-27 16:08:24 -04:00
Victor Shnayder
94ac61ffe2
Make decision about export file splitting overrideable
...
* create split_to_file() function
* chapters, html, problems always split
* course never split
* others based on size of subtree for now
2012-07-27 16:08:22 -04:00
Victor Shnayder
e0513f5f24
Fix course tag name on export of definition
2012-07-27 16:08:22 -04:00
Victor Shnayder
5f84e61925
Add hook for error handling during xml import
...
* add error_handler member to DescriptorSystem
* call it where import errors happen
* also includes some refactoring in xml.py
* some more line length and docstring cleanups
2012-07-27 16:08:22 -04:00
Victor Shnayder
63f34f2e70
Line length and doc string cleanups
...
* no functionality changed in this commit.
2012-07-27 16:08:22 -04:00
David Ormsbee
2671801f93
Add optional hide_from_toc attribute to XML elements to support Tutorials (which don't show up in the navigation).
2012-07-26 14:55:42 -04:00
Bridger Maxwell
f9de962365
Merge remote-tracking branch 'origin/master' into course_start
2012-07-13 13:40:01 -04:00
Bridger Maxwell
8d7c4ad8de
Added a start date to courses. Created a decorator to retrieve the course and check that it is open.
2012-07-12 16:27:20 -04:00
Calen Pennington
d1d57e81cf
Don't crash the system if you can't parse an xml file while loading a definition for a module descriptor
2012-07-12 14:04:09 -04:00
Calen Pennington
b29649c49b
Allow for more flexible candidates for replacement filepaths
2012-07-11 23:02:33 -04:00
Calen Pennington
b3ab9c23f7
Allow importing of courses that don't have the expected path/filename structure for problems and html
2012-07-11 23:02:33 -04:00
Calen Pennington
f0717570c0
Clean up how mapping from metadata to xml attributes is done
2012-07-11 22:19:34 -04:00
Calen Pennington
a4d2245b44
Add comment about LazyLoadingDict
2012-07-11 22:19:34 -04:00
Calen Pennington
77fea77726
Define type of resource_fs in export_to_xml docstring
2012-07-11 22:18:41 -04:00
Calen Pennington
3cef71431e
Make mapping from xml attributes to metadata values less manual
2012-07-11 22:18:40 -04:00
Calen Pennington
cfd6890d68
Merge remote-tracking branch 'origin/master' into cpennington/cms-github
...
Conflicts:
common/lib/xmodule/xmodule/xml_module.py
2012-07-10 08:50:54 -04:00
ichuang
aedcd9a4c4
change "type" to "category" in xml_module.py
2012-07-08 22:04:54 -04:00
ichuang
0daf7b0497
merging of stable-edx4edx into master - bugfixes and debugging
2012-07-08 19:03:29 -04:00
Calen Pennington
894ae58bc3
Use unicode for filepaths in data repos
2012-07-03 21:22:36 -04:00
Calen Pennington
67a732a0ff
Allow the HTML module to use the lxml HTML parser when parsing html file includes
2012-07-03 13:18:01 -04:00
Calen Pennington
3355f804d1
Add logging of filename when module file parsing fails
2012-07-02 20:01:01 -04:00
Calen Pennington
a0f550396c
Make xmodule fit the typical python installation setup
2012-07-02 13:19:27 -04:00